mirror of
https://github.com/hedge-dev/XenosRecomp.git
synced 2025-10-30 07:12:17 +00:00
Fix half pixel getting applied twice to reverse Z vertex shaders. (#21)
This commit is contained in:
parent
421e3b3e79
commit
990d03b28a
1 changed files with 9 additions and 1 deletions
|
|
@ -1828,7 +1828,12 @@ void ShaderRecompiler::recompile(const uint8_t* shaderData, const std::string_vi
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
out += "\toPos.xy += g_HalfPixelOffset * oPos.w;\n";
|
#ifdef UNLEASHED_RECOMP
|
||||||
|
if (!hasMtxProjection)
|
||||||
|
#endif
|
||||||
|
{
|
||||||
|
out += "\toPos.xy += g_HalfPixelOffset * oPos.w;\n";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (simpleControlFlow)
|
if (simpleControlFlow)
|
||||||
|
|
@ -1874,6 +1879,9 @@ void ShaderRecompiler::recompile(const uint8_t* shaderData, const std::string_vi
|
||||||
#ifdef UNLEASHED_RECOMP
|
#ifdef UNLEASHED_RECOMP
|
||||||
if (hasMtxProjection)
|
if (hasMtxProjection)
|
||||||
out += "\t}\n";
|
out += "\t}\n";
|
||||||
|
|
||||||
|
if (!isPixelShader && hasMtxProjection)
|
||||||
|
out += "\toPos.xy += g_HalfPixelOffset * oPos.w;\n";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
out += "}";
|
out += "}";
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue