Original Post
Hi I'm trying to render a scene with either shaders or without shaders, and I want it to look exactly the same either way. I'm using a basic lighting model on a test model of a cube. According to the documentation, the light's default ambient factor is (0.0,0.0,0.0,1.0) and the default material's ambient factor is (0.2,0.2,0.2,1.0). In my shader, the ambient factor is calculated by materialambient*lightambient. Thus, by default, the ambient factor is (0.2,0.2,0.2,1.0)*(0.0,0.0,0.0,1.0) = (0.0,0.0,0.0,1.0). So, when I render the scene with shaders, the underside of the cube is dark. When I render without shaders, I'm seeing what appears to be ambient lighting on the bottom of the cube. I would not expect this if the ambient factor is found by materialambient*lightambient. Is materialambient*lightambient the way fixed functionality calculates the ambient factor? I'm guessing not, given my results. How does it? Thanks, -G