mirror of
https://github.com/RetroDECK/Supermodel.git
synced 2025-04-10 19:15:14 +00:00
don't clamp after spot light code, looks much closer to h/w
This commit is contained in:
parent
8ba8d7290e
commit
3f9936d664
|
@ -103,6 +103,8 @@ static const char *fragmentShaderBasic =
|
||||||
// Total light intensity: sum of all components
|
// Total light intensity: sum of all components
|
||||||
"lightIntensity = vec3(sunFactor*lighting[1].x + lighting[1].y);\n" // ambient + diffuse
|
"lightIntensity = vec3(sunFactor*lighting[1].x + lighting[1].y);\n" // ambient + diffuse
|
||||||
|
|
||||||
|
"lightIntensity = clamp(lightIntensity,0.0,1.0);\n"
|
||||||
|
|
||||||
"vec2 ellipse;\n"
|
"vec2 ellipse;\n"
|
||||||
"float insideSpot;\n"
|
"float insideSpot;\n"
|
||||||
|
|
||||||
|
@ -114,7 +116,6 @@ static const char *fragmentShaderBasic =
|
||||||
"lightIntensity.rgb += (1.0 - insideSpot)*spotColor;\n"
|
"lightIntensity.rgb += (1.0 - insideSpot)*spotColor;\n"
|
||||||
"}\n"
|
"}\n"
|
||||||
|
|
||||||
"lightIntensity = clamp(lightIntensity,0.0,1.0);\n"
|
|
||||||
|
|
||||||
"finalData.rgb *= lightIntensity;\n"
|
"finalData.rgb *= lightIntensity;\n"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue