1
0
mirror of https://github.com/LearnOpenGL-CN/LearnOpenGL-CN.git synced 2025-08-23 04:35:28 +08:00

Merge branch 'new-theme' of github.com:LearnOpenGL-CN/LearnOpenGL-CN into new-theme

This commit is contained in:
Meow J
2017-10-11 19:23:32 -04:00

View File

@@ -398,7 +398,7 @@ vector<Texture> specularMaps = this->loadMaterialTextures(
```c++ ```c++
vec3 T = normalize(vec3(model * vec4(tangent, 0.0))); vec3 T = normalize(vec3(model * vec4(tangent, 0.0)));
vec3 N = normalize(vec3(model * vec4(tangent, 0.0))); vec3 N = normalize(vec3(model * vec4(normal, 0.0)));
// re-orthogonalize T with respect to N // re-orthogonalize T with respect to N
T = normalize(T - dot(T, N) * N); T = normalize(T - dot(T, N) * N);
// then retrieve perpendicular vector B with the cross product of T and N // then retrieve perpendicular vector B with the cross product of T and N