Sunday, May 16, 2010

Compile Cg shaders from command line

Use cgc to compile Cg shader programs from the command line. (cgc --help for usage). Useful for seeing errors/warnings and instruction counts.

Cheat sheet:
Vertex shader: cgc vert.cg -entry main -profile arbvp1
Fragment shader: cgc frag.cg -entry main -profile arbfp1

No comments: