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