danini-the-panini/mittsu-opengl

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

Summary

Maintainability
Test Coverage
#ifdef USE_MORPHNORMALS

    vec3 morphedNormal = vec3( 0.0 );

    morphedNormal += ( morphNormal0 - normal ) * morphTargetInfluences[ 0 ];
    morphedNormal += ( morphNormal1 - normal ) * morphTargetInfluences[ 1 ];
    morphedNormal += ( morphNormal2 - normal ) * morphTargetInfluences[ 2 ];
    morphedNormal += ( morphNormal3 - normal ) * morphTargetInfluences[ 3 ];

    morphedNormal += normal;

#endif