Преглед на файлове

TSL: BufferAttributeNode - Fix setUsage on non-InterleavedBuffer (#28742)

* TSL: Fix setUsage on non-interleavedBuffer attributes

* test fix pup

* cleanup

---------
Renaud Rohlinger преди 1 година
родител
ревизия
eac2954d5a
променени са 3 файла, в които са добавени 6 реда и са изтрити 2 реда
  1. 6 0
      examples/jsm/nodes/accessors/BufferAttributeNode.js
  2. BIN
      examples/screenshots/webgpu_reflection.jpg
  3. 0 2
      examples/webgpu_instance_mesh.html

+ 6 - 0
examples/jsm/nodes/accessors/BufferAttributeNode.js

@@ -126,6 +126,12 @@ class BufferAttributeNode extends InputNode {
 
 		this.usage = value;
 
+		if ( this.attribute && this.attribute.isBufferAttribute === true ) {
+
+			this.attribute.usage = value;
+
+		}
+
 		return this;
 
 	}

BIN
examples/screenshots/webgpu_reflection.jpg


+ 0 - 2
examples/webgpu_instance_mesh.html

@@ -155,8 +155,6 @@
 
 					}
 
-					mesh.instanceMatrix.needsUpdate = true;
-			
 				}
 
 				await renderer.render( scene, camera );