Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Batching - fallback for 2d skinning with unrigged polys. #48647

Merged
merged 1 commit into from
May 13, 2021

Conversation

lawnjelly
Copy link
Member

@lawnjelly lawnjelly commented May 11, 2021

In the legacy renderer unrigged polys would display with no transform applied, whereas the software skinning didn't deal with these at all (outputted them with position zero). This PR simply copies the source to destination verts and replicates the legacy behaviour.

Fixes #48641

Notes

  • I think this is fine, I tried a variety of situations and couldn't break it (but of course welcome more testing)
  • We could alternatively instead of copying the vertices just not enter the software skinning function, but this keeps the same path so may be slightly preferable, performance difference is likely to be negligible and unrigged polys are unlikely to be used in production.
  • I wanted to check whether there was a situation where some vertices were assigned a bone and some not, but this appears not to happen. As far as I can see they are all rigged, or none at all, which makes the fix nice and easy.

In the legacy renderer unrigged polys would display with no transform applied, whereas the software skinning didn't deal with these at all (outputted them with position zero). This PR simply copies the source to destination verts and replicates the legacy behaviour.
@lawnjelly lawnjelly requested a review from a team as a code owner May 11, 2021 16:41
@lawnjelly lawnjelly changed the title [WIP] Batching - fallback for 2d skinning with unrigged polys. Batching - fallback for 2d skinning with unrigged polys. May 11, 2021
@Calinou Calinou added this to the 3.4 milestone May 11, 2021
@akien-mga akien-mga merged commit 009a738 into godotengine:3.x May 13, 2021
@akien-mga
Copy link
Member

Thanks!

@akien-mga
Copy link
Member

Cherry-picked for 3.3.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants