瀏覽代碼

OutlineEffect: Fixed breakage due to normals defaultnormal_vertex.glsl changes. See #11271.

Mr.doob 8 年之前
父節點
當前提交
3c4b4b8183
共有 1 個文件被更改,包括 3 次插入7 次删除
  1. 3 7
      examples/js/effects/OutlineEffect.js

+ 3 - 7
examples/js/effects/OutlineEffect.js

@@ -95,10 +95,10 @@ THREE.OutlineEffect = function ( renderer, parameters ) {
 		"#if ! defined( LAMBERT ) && ! defined( PHONG ) && ! defined( TOON ) && ! defined( PHYSICAL )",
 		"#if ! defined( LAMBERT ) && ! defined( PHONG ) && ! defined( TOON ) && ! defined( PHYSICAL )",
 
 
 		"	#ifndef USE_ENVMAP",
 		"	#ifndef USE_ENVMAP",
-		"		vec3 objectNormal = normalize( normal );",
+		"		vec3 transformedNormal = normalize( normal );",
 
 
 		"		#ifdef FLIP_SIDED",
 		"		#ifdef FLIP_SIDED",
-		"			objectNormal = -objectNormal;",
+		"			transformedNormal = -transformedNormal;",
 		"		#endif",
 		"		#endif",
 
 
 		"	#endif",
 		"	#endif",
@@ -109,11 +109,7 @@ THREE.OutlineEffect = function ( renderer, parameters ) {
 		"	vec3 transformed = vec3( position );",
 		"	vec3 transformed = vec3( position );",
 		"#endif",
 		"#endif",
 
 
-		"#ifdef USE_SKINNING",
-		"	gl_Position = calculateOutline( gl_Position, objectNormal, skinned );",
-		"#else",
-		"	gl_Position = calculateOutline( gl_Position, objectNormal, vec4( transformed, 1.0 ) );",
-		"#endif",
+		"gl_Position = calculateOutline( gl_Position, transformedNormal, vec4( transformed, 1.0 ) );",
 
 
 		"#include <fog_vertex>"
 		"#include <fog_vertex>"