sunag 4 years ago
parent
commit
bf85611afb
1 changed files with 5 additions and 10 deletions
  1. 5 10
      examples/webgpu_instance_uniform.html

+ 5 - 10
examples/webgpu_instance_uniform.html

@@ -34,15 +34,15 @@
 					super( 'vec3' );
 					super( 'vec3' );
 
 
 					this.updateType = NodeUpdateType.Object;
 					this.updateType = NodeUpdateType.Object;
-					
+
 					this.inputNode = new ColorNode( new THREE.Color() );
 					this.inputNode = new ColorNode( new THREE.Color() );
-					
+
 				}
 				}
 
 
 				update( frame ) {
 				update( frame ) {
 
 
 					const mesh = frame.object;
 					const mesh = frame.object;
-					
+
 					this.inputNode.value.copy( mesh.color );
 					this.inputNode.value.copy( mesh.color );
 
 
 				}
 				}
@@ -99,14 +99,9 @@
 
 
 				const geometry = new TeapotGeometry( 50, 18 );
 				const geometry = new TeapotGeometry( 50, 18 );
 
 
-				for ( let i = 0, l = 10; i < l; i ++ ) {
+				for ( let i = 0, l = 12; i < l; i ++ ) {
 
 
-					// use material after fix material instance in WebGPU
-					const materialTemp = new THREE.MeshBasicMaterial();
-					materialTemp.colorNode = instanceUniform;
-					// --
-					
-					addMesh( geometry, materialTemp );
+					addMesh( geometry, material );
 
 
 				}
 				}