Skip to content

Commit

Permalink
Make sure the color attribute is not duplicated
Browse files Browse the repository at this point in the history
  • Loading branch information
Popov72 committed Oct 31, 2023
1 parent dce706a commit f6660c0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/dev/core/src/Materials/shaderMaterial.ts
Expand Up @@ -700,7 +700,9 @@ export class ShaderMaterial extends PushMaterial {
}

if (mesh && mesh.isVerticesDataPresent(VertexBuffer.ColorKind)) {
attribs.push(VertexBuffer.ColorKind);
if (attribs.indexOf(VertexBuffer.ColorKind) === -1) {
attribs.push(VertexBuffer.ColorKind);
}
defines.push("#define VERTEXCOLOR");
}

Expand Down

0 comments on commit f6660c0

Please sign in to comment.