diff --git a/XenosRecomp/shader_recompiler.cpp b/XenosRecomp/shader_recompiler.cpp index c73483c..bb5e82c 100644 --- a/XenosRecomp/shader_recompiler.cpp +++ b/XenosRecomp/shader_recompiler.cpp @@ -1784,7 +1784,8 @@ void ShaderRecompiler::recompile(const uint8_t* shaderData, const std::string_vi } else { - out += "\toPos.xy += g_HalfPixelOffset * oPos.w;\n"; + if (!hasMtxProjection) + out += "\toPos.xy += g_HalfPixelOffset * oPos.w;\n"; } if (simpleControlFlow) @@ -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 += "}"; }