diff --git a/examples/js/effects/OutlineEffect.js b/examples/js/effects/OutlineEffect.js index 0bc183e73445a7c674bfddd5320e447cc6aab1c4..7e176b68d8e8aa09a426213c54519045be7d91e8 100644 --- a/examples/js/effects/OutlineEffect.js +++ b/examples/js/effects/OutlineEffect.js @@ -93,23 +93,20 @@ THREE.OutlineEffect = function ( renderer, parameters ) { var vertexShaderChunk2 = [ "#if ! defined( LAMBERT ) && ! defined( PHONG ) && ! defined( TOON ) && ! defined( PHYSICAL )", - " #ifndef USE_ENVMAP", - " vec3 transformedNormal = normalize( normal );", - - " #ifdef FLIP_SIDED", - " transformedNormal = -transformedNormal;", - " #endif", - + " vec3 objectNormal = normalize( normal );", " #endif", + "#endif", + "#ifdef FLIP_SIDED", + " objectNormal = -objectNormal;", "#endif", "#ifdef DECLARE_TRANSFORMED", " vec3 transformed = vec3( position );", "#endif", - "gl_Position = calculateOutline( gl_Position, transformedNormal, vec4( transformed, 1.0 ) );", + "gl_Position = calculateOutline( gl_Position, objectNormal, vec4( transformed, 1.0 ) );", "#include "