Skip to content

Commit

Permalink
Merge pull request #12333 from CedricGuillemet/FixInstancePBRMetallic
Browse files Browse the repository at this point in the history
Fix instance color forwarding for PBR Instances
  • Loading branch information
sebavan authored Apr 4, 2022
2 parents 2b72313 + 2636da0 commit 70c4f53
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/dev/core/src/Materials/PBR/pbrBaseMaterial.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1326,6 +1326,10 @@ export abstract class PBRBaseMaterial extends PushMaterial {
attribs.push(VertexBuffer.ColorKind);
}

if (defines.INSTANCESCOLOR) {
attribs.push(VertexBuffer.ColorInstanceKind);
}

MaterialHelper.PrepareAttributesForBones(attribs, mesh, defines, fallbacks);
MaterialHelper.PrepareAttributesForInstances(attribs, defines);
MaterialHelper.PrepareAttributesForMorphTargets(attribs, mesh, defines);
Expand Down

0 comments on commit 70c4f53

Please sign in to comment.