2
0
Эх сурвалжийг харах

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

Renaud Rohlinger 1 жил өмнө
parent
commit
b156ec846d

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

@@ -146,7 +146,15 @@ class Geometries extends DataMap {
 
 		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 );
+
+			}
 
 		}