Fixed normal computation in RM

This commit is contained in:
Emmanuel BENOîT 2017-10-03 09:11:47 +02:00
parent be460bce83
commit c248e66fc2

View file

@ -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 ) );
}