Fixed normal computation in RM
This commit is contained in:
parent
be460bce83
commit
c248e66fc2
1 changed files with 1 additions and 1 deletions
|
@ -3,7 +3,7 @@ vec3 getNormal( vec3 pos )
|
||||||
vec2 v = vec2( .0005 , 0 );
|
vec2 v = vec2( .0005 , 0 );
|
||||||
return normalize( vec3(
|
return normalize( vec3(
|
||||||
map( pos + v.xyy ).x - map( pos - v.xyy ).x ,
|
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 ) );
|
map( pos + v.yyx ).x - map( pos - v.yyx ).x ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue