From 3d878cf6a6761a2e25629e11fa46f9d98da3201c Mon Sep 17 00:00:00 2001 From: Marisa Kirisame Date: Mon, 6 Dec 2021 16:46:09 +0100 Subject: [PATCH] Finetune retrofx math. --- shaders/glsl/mfx_retrofx.fp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/shaders/glsl/mfx_retrofx.fp b/shaders/glsl/mfx_retrofx.fp index df8c580..c8196d6 100644 --- a/shaders/glsl/mfx_retrofx.fp +++ b/shaders/glsl/mfx_retrofx.fp @@ -5,6 +5,9 @@ void main() { // far more simplified when the actual scale calculations are on the zscript side - ivec2 ncoord = ivec2((floor(TexCoord*bresl)/bresl)*textureSize(InputTexture,0)); - FragColor = texelFetch(InputTexture,ncoord,0); + vec2 ncoord = floor(TexCoord*bresl)/bresl; + FragColor = vec4(textureGather(InputTexture,ncoord,0).y, + textureGather(InputTexture,ncoord,1).y, + textureGather(InputTexture,ncoord,2).y, + textureGather(InputTexture,ncoord,3).y); }