From aea67fb370349b06766b987a3e5d15b9c6ad4238 Mon Sep 17 00:00:00 2001 From: s2s <12202580+standard-two-simplex@users.noreply.github.com> Date: Tue, 12 Oct 2021 11:57:04 +0200 Subject: [PATCH] Do not apply the texture coordinate offset to background textures. Fixes #2594 --- .../GLSL/glsl_CombinerProgramUniformFactory.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Graphics/OpenGLContext/GLSL/glsl_CombinerProgramUniformFactory.cpp b/src/Graphics/OpenGLContext/GLSL/glsl_CombinerProgramUniformFactory.cpp index 94e4d536..def95ba6 100644 --- a/src/Graphics/OpenGLContext/GLSL/glsl_CombinerProgramUniformFactory.cpp +++ b/src/Graphics/OpenGLContext/GLSL/glsl_CombinerProgramUniformFactory.cpp @@ -1096,8 +1096,10 @@ public: aShiftScale[t][0] = pTile->shifts > 10 ? static_cast(1 << (16 - pTile->shifts)) : 1.0f / static_cast(1 << pTile->shifts); aShiftScale[t][1] = pTile->shiftt > 10 ? static_cast(1 << (16 - pTile->shiftt)) : 1.0f / static_cast(1 << pTile->shiftt); - aTexOffset[t][0] = pTile->fuls; - aTexOffset[t][1] = pTile->fult; + if (pTile->textureMode != TEXTUREMODE_BGIMAGE && pTile->textureMode != TEXTUREMODE_FRAMEBUFFER_BG) { + aTexOffset[t][0] = pTile->fuls; + aTexOffset[t][1] = pTile->fult; + } aHDRatio[t][0] = pTexture->hdRatioS; aHDRatio[t][1] = pTexture->hdRatioT;