Browse Source

Less crazy eyes for deferred Ben.

Deferred rendering doesn't play well with transparency.
alteredq 12 years ago
parent
commit
c6d47f7d40
1 changed files with 13 additions and 1 deletions
  1. 13 1
      examples/webgl_lights_deferred_pointlights.html

+ 13 - 1
examples/webgl_lights_deferred_pointlights.html

@@ -569,6 +569,18 @@
 						material.color.copy( node.material.color );
 						material.color.copy( node.material.color );
 						material.map = node.material.map;
 						material.map = node.material.map;
 
 
+						if ( node.material.transparent ) {
+
+							material.alphaTest = 0.1;
+
+						}
+
+						if ( node.material.name === "eyetrans" ) {
+
+							material.visible = false;
+
+						}
+
 						node.colorMaterial = material;
 						node.colorMaterial = material;
 
 
 					}
 					}
@@ -781,7 +793,7 @@
 
 
 			var loader = new THREE.UTF8Loader();
 			var loader = new THREE.UTF8Loader();
 
 
-			loader.load( "models/utf8/ben.js", function ( object ) {
+			loader.load( "models/utf8/ben_dds.js", function ( object ) {
 
 
 				bootstrap();
 				bootstrap();
 				initScene( object, -75, 150 );
 				initScene( object, -75, 150 );