1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-03-03 17:49:41 +00:00

Fix incorrect multiplication order of TBN matrix (Bug #3440)

This commit is contained in:
scrawl 2016-06-16 17:31:17 +02:00
parent 693d3cea4a
commit aa5a643e3b

View file

@ -1,8 +1,8 @@
#define PARALLAX_SCALE 0.04
#define PARALLAX_BIAS -0.02
vec2 getParallaxOffset(vec3 eyeDir, mat3 tbn, float height)
vec2 getParallaxOffset(vec3 eyeDir, mat3 tbnTranspose, float height)
{
vec3 TSeyeDir = normalize((vec4(normalize(tbn * eyeDir),0)).xyz);
vec3 TSeyeDir = normalize(eyeDir * tbnTranspose);
return TSeyeDir.xy * ( height * PARALLAX_SCALE + PARALLAX_BIAS );
}