Skip to content

Commit

Permalink
Fix OutlineEffect broken by #11271
Browse files Browse the repository at this point in the history
  • Loading branch information
takahirox authored and mrdoob committed Jun 22, 2017
1 parent 30fdd6e commit b35244d
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions examples/js/effects/OutlineEffect.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 <fog_vertex>"

Expand Down

0 comments on commit b35244d

Please sign in to comment.