Eevee: Fix tangent being renormalized after interpolation
This commit is contained in:
parent
66225e84cf
commit
1d6009d7aa
|
@ -2971,9 +2971,8 @@ void node_normal_map(vec4 tangent, vec3 normal, vec3 texnormal, out vec3 outnorm
|
|||
outnormal = normal;
|
||||
return;
|
||||
}
|
||||
float fsign = (gl_FrontFacing ? 1.0 : -1.0);
|
||||
tangent.xyz = normalize(tangent.xyz) * fsign;
|
||||
vec3 B = tangent.w * cross(normal, tangent.xyz) * fsign;
|
||||
tangent *= (gl_FrontFacing ? 1.0 : -1.0);
|
||||
vec3 B = tangent.w * cross(normal, tangent.xyz);
|
||||
|
||||
outnormal = texnormal.x * tangent.xyz + texnormal.y * B + texnormal.z * normal;
|
||||
outnormal = normalize(outnormal);
|
||||
|
|
Loading…
Reference in New Issue