Cg Language

Started by
2 comments, last by Gumgo 15 years, 11 months ago
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. =)
Advertisement
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!
Thanks for the links, I'll check them out.
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?

This topic is closed to new replies.

Advertisement