Has anyone had any problems trying to use the gl_FrontLightModelProduct.sceneColor builtin uniform? I’ve been going through the orange book’s lighting section in chapter 9, and I’ve used the code in listing 9.11.
gl_FrontLightModelProduct.sceneColor is meant to be
gl_FrontLightModelProduct.sceneColor = gl_FrontMaterial.emission + gl_FrontMaterial.ambient * gl_LightModel.ambient;
But at the moment it seems to be completely ignoring the material properties, and only giving me
gl_FrontLightModelProduct.sceneColor = gl_LightModel.ambient;
Using gl_FrontMaterial directly, or manually calculating the product works fine, and that’s how I’ve been getting around the problem, but it’s obviously not a very good solution.
I can’t think of anything in OpenGL that I’d need to set other than glMaterial*()… is there anything else in GLSL that I should check?
I’m using a 6800 GT with nvidia’s 1.0-6111 linux driver.