From 97971464d19d1f86b7e7e0da7224ed80dd8ad275 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Mon, 11 Jan 2021 14:07:45 +1000 Subject: [PATCH] GPU/ShaderGen: Remove texcoord offset Doesn't seem to be needed anymore, and causes issues in some games (e.g. flickering polygons in Evil Dead) --- src/core/gpu_hw_shadergen.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/core/gpu_hw_shadergen.cpp b/src/core/gpu_hw_shadergen.cpp index f24418631..3a5983986 100644 --- a/src/core/gpu_hw_shadergen.cpp +++ b/src/core/gpu_hw_shadergen.cpp @@ -97,8 +97,6 @@ std::string GPU_HW_ShaderGen::GenerateBatchVertexShader(bool textured) CONSTANT float POS_EPSILON = 0.00001; #endif #endif - -CONSTANT float TEX_EPSILON = 0.00001; )"; if (textured) @@ -159,10 +157,8 @@ CONSTANT float TEX_EPSILON = 0.00001; v_col0 = a_col0; #if TEXTURED - // Fudge the texture coordinates by half a pixel in screen-space. - // This fixes the rounding/interpolation error on NVIDIA GPUs with shared edges between triangles. - v_tex0 = float2(float((a_texcoord & 0xFFFFu) * RESOLUTION_SCALE) + TEX_EPSILON, - float((a_texcoord >> 16) * RESOLUTION_SCALE) + TEX_EPSILON); + v_tex0 = float2(float((a_texcoord & 0xFFFFu) * RESOLUTION_SCALE), + float((a_texcoord >> 16) * RESOLUTION_SCALE)); // base_x,base_y,palette_x,palette_y v_texpage.x = (a_texpage & 15u) * 64u * RESOLUTION_SCALE;