From 75ba0a7957b2981264b8db6e4912a73c1f4c3e38 Mon Sep 17 00:00:00 2001 From: Ayush Singla Date: Fri, 18 Nov 2022 16:24:56 +0530 Subject: fixed incorrect mesh normals in shaders --- drivers/gles3/shaders/scene.glsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/gles3/shaders/scene.glsl b/drivers/gles3/shaders/scene.glsl index ed176c7829..57d2e22293 100644 --- a/drivers/gles3/shaders/scene.glsl +++ b/drivers/gles3/shaders/scene.glsl @@ -102,7 +102,7 @@ vec3 oct_to_vec3(vec2 e) { vec3 v = vec3(e.xy, 1.0 - abs(e.x) - abs(e.y)); float t = max(-v.z, 0.0); v.xy += t * -sign(v.xy); - return v; + return normalize(v); } #ifdef USE_INSTANCING -- cgit v1.2.3