From da43f9a156ae58593a73f8b529a11fa4fcb51d42 Mon Sep 17 00:00:00 2001 From: Jules Blok Date: Wed, 7 Sep 2016 21:13:16 +0200 Subject: [PATCH] PixelShaderGen: Always divide the texture coordinates by q. Some games will set q to a different value than 1.0 through texture matrix manipulations. It seems the console will still do the division in that case. --- Source/Core/VideoCommon/PixelShaderGen.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/Source/Core/VideoCommon/PixelShaderGen.cpp b/Source/Core/VideoCommon/PixelShaderGen.cpp index 514ae76998..13d6bdd13e 100644 --- a/Source/Core/VideoCommon/PixelShaderGen.cpp +++ b/Source/Core/VideoCommon/PixelShaderGen.cpp @@ -645,15 +645,7 @@ ShaderCode GeneratePixelShaderCode(DSTALPHA_MODE dstAlphaMode, APIType ApiType, for (unsigned int i = 0; i < uid_data->genMode_numtexgens; ++i) { out.Write("\tint2 fixpoint_uv%d = itrunc(", i); - // optional perspective divides - if (((uid_data->texMtxInfo_n_projection >> i) & 1) == XF_TEXPROJ_STQ) - { - out.Write("(uv%d.z == 0.0 ? uv%d.xy : uv%d.xy / uv%d.z)", i, i, i, i); - } - else - { - out.Write("uv%d.xy", i); - } + out.Write("(uv%d.z == 0.0 ? uv%d.xy : uv%d.xy / uv%d.z)", i, i, i, i); out.Write(" * " I_TEXDIMS "[%d].zw);\n", i); // TODO: S24 overflows here? }