Flip the parallax offset Y component based on tangent parity (Bug #3440)
parent
6f5b68859f
commit
8e23c37668
@ -1,8 +1,8 @@
|
||||
#define PARALLAX_SCALE 0.04
|
||||
#define PARALLAX_BIAS -0.02
|
||||
|
||||
vec2 getParallaxOffset(vec3 eyeDir, mat3 tbnTranspose, float height)
|
||||
vec2 getParallaxOffset(vec3 eyeDir, mat3 tbnTranspose, float height, float flipY)
|
||||
{
|
||||
vec3 TSeyeDir = normalize(eyeDir * tbnTranspose);
|
||||
return TSeyeDir.xy * ( height * PARALLAX_SCALE + PARALLAX_BIAS );
|
||||
return vec2(TSeyeDir.x, TSeyeDir.y * flipY) * ( height * PARALLAX_SCALE + PARALLAX_BIAS );
|
||||
}
|
||||
|
Loading…
Reference in New Issue