Explorar o código

WebGPURenderer: Allow using StorageBuffer directly as attribute in nodes (#28620)

Renaud Rohlinger hai 1 ano
pai
achega
b156ec846d
Modificáronse 1 ficheiros con 9 adicións e 1 borrados
  1. 9 1
      examples/jsm/renderers/common/Geometries.js

+ 9 - 1
examples/jsm/renderers/common/Geometries.js

@@ -146,7 +146,15 @@ class Geometries extends DataMap {
 
 
 		for ( const attribute of attributes ) {
 		for ( const attribute of attributes ) {
 
 
-			this.updateAttribute( attribute, AttributeType.VERTEX );
+			if ( attribute.isStorageBufferAttribute || attribute.isStorageInstancedBufferAttribute ) {
+
+				this.updateAttribute( attribute, AttributeType.STORAGE );
+
+			} else {
+
+				this.updateAttribute( attribute, AttributeType.VERTEX );
+
+			}
 
 
 		}
 		}