Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix OutlineEffect broken by #11271 #11578

Merged
merged 1 commit into from
Jun 22, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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