- Home /
CGPROGRAM supported #pragma keywords
I'm trying to write up a few surface shaders and am new to CG framgents. Most of what I am doing is not very complex, but I keep having troubles finding what keywords are supported or possible in the #pragma surface line of the CGPROGRAM part. I.E. I know I have the lambert and blinnphong surfaces, but not any others or when/why I may use them. It also took me a few hours to realize I needed the alpha keyword in there for a transparent shader.
Does anyone have a pointer to such information? (index or reference with descriptions) I found NVidea's reference for language keywords and function library, but what is possible in #pragma seems to be Unity specific.
Answer by efge · Apr 08, 2011 at 08:58 PM
The supported #pragma statements can be found here: Writing vertex and fragment shaders - Cg snippets
The built-in lighting models are Lambert for diffuse lighting and BlinnPhong for specular lighting.
Here is the reference: Custom Lighting models in Surface Shaders
Thanks! Not sure how I missed the optional parameters section in http://unity3d.com/support/documentation/Components/SL-SurfaceShaders.html but it was all there.