From 2d88b57dcac416b603863b283029bc1062f99bdf Mon Sep 17 00:00:00 2001 From: "A.Olokhtonov" Date: Tue, 26 Dec 2023 02:46:57 +0300 Subject: [PATCH] Fix off-by-factor-of-2 in the vertex shader --- client/webgl_shaders.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/webgl_shaders.js b/client/webgl_shaders.js index 816b470..ad5ca51 100644 --- a/client/webgl_shaders.js +++ b/client/webgl_shaders.js @@ -162,7 +162,7 @@ const sdf_vs_src = `#version 300 es } vec2 pos = origin + normalize(outwards) * radius; - screen02 = (pos.xy * u_scale + u_translation) / u_res + outwards * pixel; + screen02 = (pos.xy * u_scale + u_translation) / u_res * 2.0 + outwards * pixel; v_texcoord = pos.xy + outwards * rscale; screen02.y = 2.0 - screen02.y;