mirror of
https://github.com/RetroDECK/Supermodel.git
synced 2024-11-29 17:15:40 +00:00
Clamping diffuse+ambient light intensity to 1.0 (legacy engine)
This commit is contained in:
parent
faf5f9cf48
commit
38d5d14157
|
@ -129,7 +129,7 @@ void main(void)
|
|||
sunFactor = max(dot(sunVector,viewNormal),0.0);
|
||||
|
||||
// Total light intensity: sum of all components
|
||||
fsLightIntensity *= (sunFactor*lighting[1].x+lighting[1].y);
|
||||
fsLightIntensity *= min(1.0,(sunFactor*lighting[1].x+lighting[1].y));
|
||||
|
||||
/*
|
||||
* Specular Lighting
|
||||
|
|
|
@ -164,7 +164,7 @@ static const char vertexShaderSource[] =
|
|||
"\t\tsunFactor = max(dot(sunVector,viewNormal),0.0);\n"
|
||||
"\t\t\n"
|
||||
"\t\t// Total light intensity: sum of all components\n"
|
||||
"\t\tfsLightIntensity *= (sunFactor*lighting[1].x+lighting[1].y);\n"
|
||||
"\t\tfsLightIntensity *= min(1.0,(sunFactor*lighting[1].x+lighting[1].y));\n"
|
||||
"\t\t\n"
|
||||
"\t\t/*\n"
|
||||
"\t\t * Specular Lighting\n"
|
||||
|
|
Loading…
Reference in a new issue