mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Hardware transform: Clamp the specular coefficient to 0.0 before taking the power.
This commit is contained in:
parent
ccb968922a
commit
702e77454a
1 changed files with 1 additions and 1 deletions
|
@ -1126,7 +1126,7 @@ bool GenerateVertexShader(const VShaderID &id, char *buffer, const ShaderLanguag
|
|||
case GE_LIGHTTYPE_UNKNOWN:
|
||||
p.F(" angle = dot(u_lightdir%s, toLight);\n", iStr, iStr);
|
||||
p.F(" if (angle >= u_lightangle_spotCoef%s.x) {\n", iStr);
|
||||
p.F(" lightScale = clamp(1.0 / dot(u_lightatt%s, vec3(1.0, distance, distance*distance)), 0.0, 1.0) * (u_lightangle_spotCoef%s.y <= 0.0 ? 1.0 : pow(angle, u_lightangle_spotCoef%s.y));\n", iStr, iStr, iStr);
|
||||
p.F(" lightScale = clamp(1.0 / dot(u_lightatt%s, vec3(1.0, distance, distance*distance)), 0.0, 1.0) * (u_lightangle_spotCoef%s.y <= 0.0 ? 1.0 : pow(max(angle, 0.0), u_lightangle_spotCoef%s.y));\n", iStr, iStr, iStr);
|
||||
p.C(" } else {\n");
|
||||
p.C(" lightScale = 0.0;\n");
|
||||
p.C(" }\n");
|
||||
|
|
Loading…
Add table
Reference in a new issue