 
     #ifdef HAS_NORMALS
     #ifdef HAS_TANGENTS
-    vec3 tangent = getTangent();
-    vec3 normalW = normalize(vec3(u_NormalMatrix * vec4(getNormal(), 0.0)));
-    vec3 tangentW = normalize(vec3(u_ModelMatrix * vec4(tangent, 0.0)));
-    vec3 bitangentW = cross(normalW, tangentW) * a_Tangent.w;
-    v_TBN = mat3(tangentW, bitangentW, normalW);
+        vec3 tangent = getTangent();
+        vec3 normalW = normalize(vec3(u_NormalMatrix * vec4(getNormal(), 0.0)));
+        vec3 tangentW = normalize(vec3(u_ModelMatrix * vec4(tangent, 0.0)));
+        vec3 bitangentW = cross(normalW, tangentW) * a_Tangent.w;
+        v_TBN = mat3(tangentW, bitangentW, normalW);
     #else // !HAS_TANGENTS
-    v_Normal = normalize(vec3(u_NormalMatrix * vec4(getNormal(), 0.0)));
+        v_Normal = normalize(vec3(u_NormalMatrix * vec4(getNormal(), 0.0)));
     #endif
     #endif // !HAS_NORMALS
 

#endif

#ifdef USE_SKINNING
    normal = (mat3)(getSkinningNormalMatrix()) * normal;
#endif

    return normalize(normal);

#endif

#ifdef USE_SKINNING
    tangent = mat3(getSkinningMatrix()) * tangent;
#endif

    return normalize(tangent);
