mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04: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:
parent
81f4a76ac9
commit
f49f7c6371
1 changed files with 3 additions and 1 deletions
|
@ -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");
|
||||
|
|
Loading…
Add table
Reference in a new issue