Skip to content

Exclude skinned and morphed mesh instances from batching#8477

Merged
mvaligursky merged 1 commit into
mainfrom
mv-skin-morph-batching
Feb 24, 2026
Merged

Exclude skinned and morphed mesh instances from batching#8477
mvaligursky merged 1 commit into
mainfrom
mv-skin-morph-batching

Conversation

@mvaligursky

@mvaligursky mvaligursky commented Feb 24, 2026

Copy link
Copy Markdown
Contributor

Fixes #8474

Summary

  • Mesh instances with skin or morph are now excluded from batching, as the BatchManager does not support these features internally. Previously, such mesh instances would be incorrectly merged into batches, losing their skeletal animation and morph target data.
  • When a component has a mix of skinned/morphed and regular mesh instances, the entire component is excluded from batching and a debug warning is issued.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR prevents skinned and morphed MeshInstances from being added to batch groups, addressing issue #8474 where animated entities could lose skinning/morph state after rebatching.

Changes:

  • Added a batching eligibility check to exclude any model/render component whose mesh instances include skinInstance or morphInstance.
  • Emitted a one-time debug warning when a component mixes batchable and non-batchable mesh instances (and therefore is fully excluded).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mvaligursky mvaligursky merged commit 9fec08e into main Feb 24, 2026
12 checks passed
@mvaligursky mvaligursky deleted the mv-skin-morph-batching branch February 24, 2026 12:28
mvaligursky added a commit that referenced this pull request Feb 24, 2026
Co-authored-by: Martin Valigursky <mvaligursky@snapchat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: graphics Graphics related issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Entity with animations in batch group renders inconsistently

3 participants