mirror of
https://github.com/RetroDECK/Supermodel.git
synced 2025-04-10 19:15:14 +00:00
Clamping must be applied before the spotlight is applied on step 1.0 h/w.
This commit is contained in:
parent
609d1ba19f
commit
b184ca3e1b
|
@ -232,13 +232,13 @@ void main()
|
||||||
// Total light intensity: sum of all components
|
// Total light intensity: sum of all components
|
||||||
lightIntensity = vec3(sunFactor*lighting[1].x + lighting[1].y); // diffuse + ambient
|
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%
|
// Upper clamp is optional, step 1.5+ games will drive brightness beyond 100%
|
||||||
if(intensityClamp) {
|
if(intensityClamp) {
|
||||||
lightIntensity = min(lightIntensity,1.0);
|
lightIntensity = min(lightIntensity,1.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
lightIntensity.rgb += spotColor*lobeEffect;
|
|
||||||
|
|
||||||
finalData.rgb *= lightIntensity;
|
finalData.rgb *= lightIntensity;
|
||||||
|
|
||||||
// for now assume fixed shading doesn't work with specular
|
// for now assume fixed shading doesn't work with specular
|
||||||
|
|
Loading…
Reference in a new issue