From 9ab834126cfe55ce6ed326d19a1d55c4ff446083 Mon Sep 17 00:00:00 2001 From: Gary Wang Date: Tue, 10 Oct 2017 23:36:39 +0800 Subject: [PATCH] fix #48 --- docs/05 Advanced Lighting/04 Normal Mapping.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/05 Advanced Lighting/04 Normal Mapping.md b/docs/05 Advanced Lighting/04 Normal Mapping.md index a9bdff0..2b6a518 100644 --- a/docs/05 Advanced Lighting/04 Normal Mapping.md +++ b/docs/05 Advanced Lighting/04 Normal Mapping.md @@ -398,7 +398,7 @@ vector specularMaps = this->loadMaterialTextures( ```c++ 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 T = normalize(T - dot(T, N) * N); // then retrieve perpendicular vector B with the cross product of T and N