slightly better way of fixing planet render problem when rolling ship
This commit is contained in:
parent
b6c3541ea3
commit
7c7a004038
@ -239,7 +239,7 @@ void main()
|
||||
#else
|
||||
vec4 normalMapSample = texture2D(uNormalMap, texCoords);
|
||||
#endif
|
||||
vec3 normal = normalize(normalMapSample.xyz - vec3(0.5)) * vTBN;
|
||||
vec3 normal = vTBN * normalize(normalMapSample.xyz - vec3(0.5));
|
||||
#else
|
||||
vec3 normal = vNormal;
|
||||
#endif
|
||||
|
@ -37,7 +37,7 @@ void main(void)
|
||||
vec3 binormal = cross(vNormal, gl_NormalMatrix * vec3(0, 1, 0));
|
||||
vec3 tangent = -cross(vNormal, binormal);
|
||||
|
||||
vTBN = transpose(mat3(tangent, binormal, vNormal));
|
||||
vTBN = mat3(tangent, binormal, vNormal);
|
||||
|
||||
vEyeVector = -vec3(gl_ModelViewMatrix * gl_Vertex);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user