Commented out the colorAmbientEmissive += gl_FrontLightProduct[0].ambient; line from the fragment shader as it was

causing problems with the shadowed region being sporadically lit when using a spotlight.
This commit is contained in:
Robert Osfield
2011-07-29 11:22:32 +00:00
parent 164cd6e9b9
commit ceb8d62636

View File

@@ -55,8 +55,8 @@ StandardShadowMap::StandardShadowMap():
"void main(void) \n"
"{ \n"
" vec4 colorAmbientEmissive = gl_FrontLightModelProduct.sceneColor; \n"
" // Add ambient from Light of index = 0 \n"
" colorAmbientEmissive += gl_FrontLightProduct[0].ambient; \n"
// " // Add ambient from Light of index = 0 \n"
// " colorAmbientEmissive += gl_FrontLightProduct[0].ambient; \n"
" vec4 color = texture2D( baseTexture, gl_TexCoord[0].xy ); \n"
" color *= mix( colorAmbientEmissive, gl_Color, DynamicShadow() ); \n"
#if DISPLAY_SHADOW_TEXEL_TO_PIXEL_ERROR
@@ -325,7 +325,7 @@ StandardShadowMap::StandardShadowMap():
" gl_FrontColor = colorAmbientEmissive + \n"
" diff * gl_FrontMaterial.diffuse; \n"
" \n"
" gl_FrontSecondaryColor = vec4(spec*gl_FrontMaterial.specular); \n"
" gl_FrontSecondaryColor = vec4(spec*gl_FrontMaterial.specular); \n"
" \n"
" gl_BackColor = gl_FrontColor; \n"
" gl_BackSecondaryColor = gl_FrontSecondaryColor; \n"