Sign in to follow this  

Cg Language

This topic is 3496 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello. For a basic renderer I want to write exactly 1 vertex shader for skeletal animation. I'm using OpenGL so CG looks like my best choice. However, I don't know how to program any graphics shaders or how cg or other shading languages work. I've searched the internet and found some basic information but not enough to know how to write the shader I want. I don't really understand where to "start" with shaders - how to set up the vertex data, the extra data, how to use it, etc. I don't really want to learn every aspect of cg - just enough for this one vertex shader. If anyone could direct me to a place that may have enough information for me to do this it would be very helpful. Thanks, and sorry to contribute to the already countless "where do I start" threads. =)

Share this post


Link to post
Share on other sites
http://developer.nvidia.com/page/cg_main.html

http://developer.nvidia.com/forums/index.php

http://developer.nvidia.com/page/documentation.html

http://developer.nvidia.com/object/cg_tutorial_home.html

Specifically the last one if you wanna get setup quickly.
I don't know how active the Cg community is here, but nvidia has provided some pretty amazing resources for it - they also have DirectX SDK style examples/code for some common features when you download it.

Good luck!

Share this post


Link to post
Share on other sites
I believe I've found enough resources to slap together something basic. I have one question though, in Cg there doesn't seem to be an unsigned byte type (ubyte4) for the four bone indices and weights... what should I use instead?

Share this post


Link to post
Share on other sites

This topic is 3496 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this