|
|
@ -68,7 +68,7 @@ void main()
|
|
|
|
|
|
|
|
|
|
|
|
vec3 normalizedNormal = normalize(passNormal);
|
|
|
|
vec3 normalizedNormal = normalize(passNormal);
|
|
|
|
vec3 normalizedTangent = normalize(passTangent.xyz);
|
|
|
|
vec3 normalizedTangent = normalize(passTangent.xyz);
|
|
|
|
vec3 binormal = cross(normalizedTangent, normalizedNormal);
|
|
|
|
vec3 binormal = cross(normalizedTangent, normalizedNormal) * passTangent.w;
|
|
|
|
mat3 tbnTranspose = mat3(normalizedTangent, binormal, normalizedNormal);
|
|
|
|
mat3 tbnTranspose = mat3(normalizedTangent, binormal, normalizedNormal);
|
|
|
|
|
|
|
|
|
|
|
|
vec3 viewNormal = gl_NormalMatrix * normalize(tbnTranspose * (normalTex.xyz * 2.0 - 1.0));
|
|
|
|
vec3 viewNormal = gl_NormalMatrix * normalize(tbnTranspose * (normalTex.xyz * 2.0 - 1.0));
|
|
|
|