소스 검색

NodeMaterial: Use type 'vec3' when getting color attribute, fixing crash (#27210)

in WebGPU.
Andreas Rosdal 1 년 전
부모
커밋
4c5c68f4c6
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      examples/jsm/nodes/materials/NodeMaterial.js

+ 1 - 1
examples/jsm/nodes/materials/NodeMaterial.js

@@ -160,7 +160,7 @@ class NodeMaterial extends ShaderMaterial {
 
 		if ( this.vertexColors === true && geometry.hasAttribute( 'color' ) ) {
 
-			colorNode = vec4( colorNode.xyz.mul( attribute( 'color' ) ), colorNode.a );
+			colorNode = vec4( colorNode.xyz.mul( attribute( 'color', 'vec3' ) ), colorNode.a );
 
 		}