mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-30 17:53:42 +01:00
Revert a bad "optimization" I made in #18587
This commit is contained in:
1 parent
c9e269761a
commit
0f3dca5cea
1 file changed
+2
-2
@@ -1072,7 +1072,7 @@ bool GenerateVertexShader(const VShaderID &id, char *buffer, const ShaderLanguag
|
||||
p.C(" if (comp == 0x1u && ldot > 0.0) {\n"); // do specular
|
||||
p.C(" if (u_matspecular.a > 0.0) {\n");
|
||||
p.C(" ldot = dot(normalize(toLight + vec3(0.0, 0.0, 1.0)), worldnormal);\n");
|
||||
p.C(" ldot = pow(ldot, u_matspecular.a);\n");
|
||||
p.C(" ldot = pow(max(ldot, 0.0), u_matspecular.a);\n");
|
||||
p.C(" } else {\n");
|
||||
p.C(" ldot = 1.0;\n");
|
||||
p.C(" }\n");
|
||||
@@ -1147,7 +1147,7 @@ bool GenerateVertexShader(const VShaderID &id, char *buffer, const ShaderLanguag
|
||||
p.C(" if (ldot >= 0.0) {\n");
|
||||
p.C(" if (u_matspecular.a > 0.0) {\n");
|
||||
p.C(" ldot = dot(normalize(toLight + vec3(0.0, 0.0, 1.0)), worldnormal);\n");
|
||||
p.C(" ldot = pow(ldot, u_matspecular.a);\n");
|
||||
p.C(" ldot = pow(max(ldot, 0.0), u_matspecular.a);\n");
|
||||
p.C(" } else {\n");
|
||||
p.C(" ldot = 1.0;\n");
|
||||
p.C(" }\n");
|
||||
|
||||
Reference in new issue
Block a user