From 200078430747952ec94d7a2cef7a4ff411b532d4 Mon Sep 17 00:00:00 2001 From: Magnus Norddahl Date: Fri, 14 Apr 2017 02:01:27 +0200 Subject: [PATCH] - normalize the normal vector in the vertex shader because our vertex attribute uses a low precision format (10 bits) --- wadsrc/static/shaders/glsl/main.vp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wadsrc/static/shaders/glsl/main.vp b/wadsrc/static/shaders/glsl/main.vp index f66ee7b04..9901fba3f 100644 --- a/wadsrc/static/shaders/glsl/main.vp +++ b/wadsrc/static/shaders/glsl/main.vp @@ -62,7 +62,7 @@ void main() gl_ClipDistance[4] = worldcoord.y + ((uSplitBottomPlane.w + uSplitBottomPlane.x * worldcoord.x + uSplitBottomPlane.y * worldcoord.z) * uSplitBottomPlane.z); } - vWorldNormal = NormalModelMatrix * aNormal; + vWorldNormal = NormalModelMatrix * normalize(aNormal); vEyeNormal = NormalViewMatrix * vWorldNormal; #endif