Fix half pixel getting applied twice to reverse Z vertex shaders.

This commit is contained in:
Skyth 2025-04-03 23:00:15 +03:00
parent 4897cf7ef2
commit 56738e5893

View file

@ -1784,7 +1784,8 @@ void ShaderRecompiler::recompile(const uint8_t* shaderData, const std::string_vi
} }
else else
{ {
out += "\toPos.xy += g_HalfPixelOffset * oPos.w;\n"; if (!hasMtxProjection)
out += "\toPos.xy += g_HalfPixelOffset * oPos.w;\n";
} }
if (simpleControlFlow) if (simpleControlFlow)
@ -1824,5 +1825,8 @@ void ShaderRecompiler::recompile(const uint8_t* shaderData, const std::string_vi
if (hasMtxProjection) if (hasMtxProjection)
out += "\t}\n"; out += "\t}\n";
if (!isPixelShader && hasMtxProjection)
out += "\toPos.xy += g_HalfPixelOffset * oPos.w;\n";
out += "}"; out += "}";
} }