Browse Source

Really fixed skinning bug

Mikael Emtinger 14 years ago
parent
commit
a4a96f259c
1 changed files with 5 additions and 2 deletions
  1. 5 2
      src/renderers/WebGLRenderer.js

+ 5 - 2
src/renderers/WebGLRenderer.js

@@ -3891,9 +3891,8 @@ THREE.Snippets = {
 
 	].join("\n"),
 	
-	// vertex animation
+	// morph targets
 
-//	vertexanimated_pars_vertex: [
 	morphtarget_pars_vertex: [
 
 	"#ifdef USE_MORPHTARGETS",
@@ -3921,6 +3920,10 @@ THREE.Snippets = {
 		
 		"gl_Position = projectionMatrix * modelViewMatrix * vec4( morphed, 1.0 );",
 
+	"#else",
+		"#ifndef USE_SKINNING",
+			"gl_Position = projectionMatrix * mvPosition;",
+		"#endif",
 	"#endif"
 
 	].join("\n")