From d99d43aebaf55f8ad1fbf870faff011714ebd602 Mon Sep 17 00:00:00 2001 From: Gaerzi Date: Fri, 16 Sep 2016 14:34:41 -0400 Subject: [PATCH] Fixes to fuzz shaders --- wadsrc/static/shaders/glsl/fuzz_noise.fp | 4 ++-- wadsrc/static/shaders/glsl/fuzz_standard.fp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/wadsrc/static/shaders/glsl/fuzz_noise.fp b/wadsrc/static/shaders/glsl/fuzz_noise.fp index 9f5da5f25..b11f1800c 100644 --- a/wadsrc/static/shaders/glsl/fuzz_noise.fp +++ b/wadsrc/static/shaders/glsl/fuzz_noise.fp @@ -6,8 +6,8 @@ vec4 ProcessTexel() vec2 texCoord = vTexCoord.st; vec4 basicColor = getTexel(texCoord); - texCoord.x = float( int(texCoord.x * 128.0) ) / 128.0; - texCoord.y = float( int(texCoord.y * 128.0) ) / 128.0; + texCoord.x = float( int(texCoord.x * texSize.x) ) / texSize.x; + texCoord.y = float( int(texCoord.y * texSize.y) ) / texSize.y; float texX = sin(mod(texCoord.x * 100.0 + timer*5.0, 3.489)) + texCoord.x / 4.0; float texY = cos(mod(texCoord.y * 100.0 + timer*5.0, 3.489)) + texCoord.y / 4.0; diff --git a/wadsrc/static/shaders/glsl/fuzz_standard.fp b/wadsrc/static/shaders/glsl/fuzz_standard.fp index fd87eaa46..02624073e 100644 --- a/wadsrc/static/shaders/glsl/fuzz_standard.fp +++ b/wadsrc/static/shaders/glsl/fuzz_standard.fp @@ -6,8 +6,8 @@ vec4 ProcessTexel() vec2 texCoord = vTexCoord.st; vec4 basicColor = getTexel(texCoord); - texCoord.x = float( int(texCoord.x * 128.0) ) / 128.0; - texCoord.y = float( int(texCoord.y * 128.0) ) / 128.0; + texCoord.x = float( int(texCoord.x * texSize.x) ) / texSize.x; + texCoord.y = float( int(texCoord.y * texSize.y) ) / texSize.y; float texX = texCoord.x / 3.0 + 0.66; float texY = 0.34 - texCoord.y / 3.0;