Skip to content

Commit

Permalink
NodeMaterial: Use type 'vec3' when getting color attribute, fixing cr…
Browse files Browse the repository at this point in the history
…ash (#27210)

in WebGPU.
  • Loading branch information
andreasrosdal committed Nov 18, 2023
1 parent 4eecc89 commit 4c5c68f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/jsm/nodes/materials/NodeMaterial.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 );

}

Expand Down

0 comments on commit 4c5c68f

Please sign in to comment.