Clamping must be applied before the spotlight is applied on step 1.0 h/w.

This commit is contained in:
Ian Curtis 2018-03-10 09:13:28 +00:00
parent 609d1ba19f
commit b184ca3e1b

View file

@ -232,13 +232,13 @@ void main()
// Total light intensity: sum of all components
lightIntensity = vec3(sunFactor*lighting[1].x + lighting[1].y); // diffuse + ambient
lightIntensity.rgb += spotColor*lobeEffect;
// Upper clamp is optional, step 1.5+ games will drive brightness beyond 100%
if(intensityClamp) {
lightIntensity = min(lightIntensity,1.0);
}
lightIntensity.rgb += spotColor*lobeEffect;
finalData.rgb *= lightIntensity;
// for now assume fixed shading doesn't work with specular