From 8ea74770fde01ed6d8d7dd50160b213a54e5f043 Mon Sep 17 00:00:00 2001 From: Magnus Norddahl Date: Fri, 5 Oct 2018 21:30:16 +0200 Subject: [PATCH] - fix artifact in PCF filter when the texture coordinate wraps --- wadsrc/static/shaders/glsl/main.fp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wadsrc/static/shaders/glsl/main.fp b/wadsrc/static/shaders/glsl/main.fp index 6bc34d275c..228d7b02d8 100644 --- a/wadsrc/static/shaders/glsl/main.fp +++ b/wadsrc/static/shaders/glsl/main.fp @@ -248,7 +248,7 @@ float sampleShadowmapPCF(vec3 planePoint, float v) texelPos -= step_count + 0.5; for (float x = -step_count; x <= step_count; x++) { - float u = texelPos / scale; + float u = fract(texelPos / scale); vec2 dir = shadowUToDir(u); ray.x = dir.x;