While programing shaders in unity, I came across many things that doesn’t have any documentation around, such as (which are important) :
- #pragma multi_compile_#####.
e.g. “fwdbase” “fwdadd” …etc - Keywords for point 1.
e.g. “DIRECTIONAL” “VERTEXLIGHT_ON” …etc
Most of keywords I get when I open the compiled shader but only if I knew what to put in point 1 and they are easy to be understood through thier names. As for now I only know the fwdbase and fwdadd. I don’t know if there are others.
These points are important to get rid of many issues like what happens if you program the 4 per-vertex lights which will not reset the array of lights colors to zeros(black) when you disable the lights. So you need VERTEXLIGHT_ON for that which is not documented as far as I know.
If there is any documents, please post its URL.