(RESOLVED) 088 : phong output shader

I’m trying to use the GLSL code that’s coming out of the output shader option in 088. When I set my material to this new GLSL material, it seems that lighting stops functioning. I can get color output by manually adjusting the starting outcol and I’m not getting an error, but I am getting a warning in an info DAT saying that diffuseContrib and specularContrib may be being used before initialization.

I’ve been playing around a bit but can’t seem to find the exact source, other than it has something to do with lighting and something getting left out concerning lighting when the shader is outputted. The OP viewer for the GLSL material does work.

Attaching the file!
glsl_330_test.2.toe (7.71 KB)

This seemed to be tied to normal mapping. It works if normal mapping isn’t used. Looking into it.

In your sample you aren’t creating tangents for the normal mapping, so the results are undefined (you’ll get a random value for the tangent in the shader). This seems to be why it’s not working.