From 0b2536dd3ea519cd9302f229311490da8d1acef3 Mon Sep 17 00:00:00 2001 From: Stuart Kenny Date: Tue, 31 May 2022 16:43:23 +0100 Subject: [PATCH] GS/HW: Fix typos in wave filter shader --- bin/resources/shaders/dx11/convert.fx | 2 +- bin/resources/shaders/vulkan/convert.glsl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/resources/shaders/dx11/convert.fx b/bin/resources/shaders/dx11/convert.fx index d41d83d924..e5576772c1 100644 --- a/bin/resources/shaders/dx11/convert.fx +++ b/bin/resources/shaders/dx11/convert.fx @@ -200,7 +200,7 @@ PS_OUTPUT ps_filter_complex(PS_INPUT input) // triangular float2 texdim, halfpixel; Texture.GetDimensions(texdim.x, texdim.y); - if (ddy(input.t.y) * texdim.y > 0.5) + if (ddy(input.t.y) * input.t.y > 0.5) output.c = sample_c(input.t); else output.c = (0.9 - 0.4 * cos(2 * PI * input.t.y * texdim.y)) * sample_c(float2(input.t.x, (floor(input.t.y * texdim.y) + 0.5) / texdim.y)); diff --git a/bin/resources/shaders/vulkan/convert.glsl b/bin/resources/shaders/vulkan/convert.glsl index baef5b13a8..97f07961cc 100644 --- a/bin/resources/shaders/vulkan/convert.glsl +++ b/bin/resources/shaders/vulkan/convert.glsl @@ -157,7 +157,7 @@ void ps_filter_complex() // triangular { const float PI = 3.14159265359f; vec2 texdim = vec2(textureSize(samp0, 0)); - if (dFdy(v_tex.y) * texdim.y > 0.5) + if (dFdy(v_tex.y) * v_tex.y > 0.5) o_col0 = sample_c(v_tex); else o_col0 = (0.9 - 0.4 * cos(2 * PI * v_tex.y * texdim.y)) * sample_c(vec2(v_tex.x, (floor(v_tex.y * texdim.y) + 0.5) / texdim.y));