Browse Source

WebGPURenderer: Fix Geometry does not have the Attribute requested by the Material (#27454)

* WebGPURenderer: Fix Geometry does not have the Attribute

* cleanup
sunag 1 year ago
parent
commit
00f29b8f28
1 changed files with 2 additions and 0 deletions
  1. 2 0
      examples/jsm/renderers/common/RenderObject.js

+ 2 - 0
examples/jsm/renderers/common/RenderObject.js

@@ -82,6 +82,8 @@ export default class RenderObject {
 
 			const attribute = nodeAttribute.node && nodeAttribute.node.attribute ? nodeAttribute.node.attribute : geometry.getAttribute( nodeAttribute.name );
 
+			if ( attribute === undefined ) continue;
+
 			attributes.push( attribute );
 
 			const bufferAttribute = attribute.isInterleavedBufferAttribute ? attribute.data : attribute;