From b35244d8777db08af2186c041b7abbd4e241b1a9 Mon Sep 17 00:00:00 2001 From: Takahiro Date: Thu, 22 Jun 2017 12:00:14 +0900 Subject: [PATCH] Fix OutlineEffect broken by #11271 --- examples/js/effects/OutlineEffect.js | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/examples/js/effects/OutlineEffect.js b/examples/js/effects/OutlineEffect.js index 0bc183e73445a7..7e176b68d8e8aa 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 "