danini-the-panini/mittsu-opengl

View on GitHub
lib/mittsu/opengl/shader/chunks/defaultnormal_vertex.glsl

Summary

Maintainability
Test Coverage
#ifdef USE_SKINNING

    vec3 objectNormal = skinnedNormal.xyz;

#elif defined( USE_MORPHNORMALS )

    vec3 objectNormal = morphedNormal;

#else

    vec3 objectNormal = normal;

#endif

#ifdef FLIP_SIDED

    objectNormal = -objectNormal;

#endif

vec3 transformedNormal = normalMatrix * objectNormal;