From c248e66fc23632ab148880ad1f98846fbac27925 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emmanuel=20Beno=C3=AEt?= Date: Tue, 3 Oct 2017 09:11:47 +0200 Subject: [PATCH] Fixed normal computation in RM --- shaders/raymarcher.glsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shaders/raymarcher.glsl b/shaders/raymarcher.glsl index 6fd1ead..3b0d922 100644 --- a/shaders/raymarcher.glsl +++ b/shaders/raymarcher.glsl @@ -3,7 +3,7 @@ vec3 getNormal( vec3 pos ) vec2 v = vec2( .0005 , 0 ); return normalize( vec3( map( pos + v.xyy ).x - map( pos - v.xyy ).x , - map( pos + v.yxy ).x - map( pos - v.xyx ).x , + map( pos + v.yxy ).x - map( pos - v.yxy ).x , map( pos + v.yyx ).x - map( pos - v.yyx ).x ) ); }