1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-15 20:19:56 +00:00
openmw-tes3mp/files/shaders/parallax.glsl

8 lines
292 B
GLSL

#define PARALLAX_SCALE 0.04
#define PARALLAX_BIAS -0.02
vec2 getParallaxOffset(vec3 eyeDir, mat3 tbnTranspose, float height, float flipY)
{
vec3 TSeyeDir = normalize(eyeDir * tbnTranspose);
return vec2(TSeyeDir.x, TSeyeDir.y * flipY) * ( height * PARALLAX_SCALE + PARALLAX_BIAS );
}