bumpVertex.fx 343 B

12345678
  1. #if defined(BUMP) || defined(PARALLAX)
  2. #if defined(TANGENT) && defined(NORMAL)
  3. vec3 normalW = normalize(vec3(finalWorld * vec4(normal, 0.0)));
  4. vec3 tangentW = normalize(vec3(finalWorld * vec4(tangent.xyz, 0.0)));
  5. vec3 bitangentW = cross(normalW, tangentW) * tangent.w;
  6. vTBN = mat3(tangentW, bitangentW, normalW);
  7. #endif
  8. #endif