mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-12 22:10:29 +02:00
D3D9: Force branch usage for fog compute.
When using `[flatten]`/default, it picks the wrong value, seemingly always taking the else case (even if the condition is changed or reversed.)
This commit is contained in:
1 parent
81f4a76ac9
commit
f49f7c6371
1 file changed
+3
-1
@@ -1283,7 +1283,9 @@ bool GenerateVertexShader(const VShaderID &id, char *buffer, const ShaderLanguag
|
||||
}
|
||||
}
|
||||
|
||||
// Compute fogdepth
|
||||
// Compute fogdepth. [branch] works around an apparent d3d9 shader compiler bug.
|
||||
if (compat.shaderLanguage == HLSL_D3D9)
|
||||
WRITE(p, " [branch]\n");
|
||||
WRITE(p, " if (u_fogcoef.x <= -65535.0 && u_fogcoef.y <= -65535.0) {\n");
|
||||
WRITE(p, " %sv_fogdepth = 1.0;\n", compat.vsOutPrefix);
|
||||
WRITE(p, " } else {\n");
|
||||
|
||||
Reference in new issue
Block a user