Skip to content

Conversation

@appgurueu
Copy link
Contributor

This is in preparation for GPU skinning. It's not helpful to have weights associated with joints, we need vec4's of weights and joint IDs as vertex attributes which we can upload to the GPU as a UBO (on OGL (ES) 3 drivers, that is).

A neat side effect is that we can get rid of the ugly Vertices_Moved.

How to test

Make sure that all your favorite skeletal animation regression tests (e.g. the ones from devtest) don't do anything funky.

@appgurueu appgurueu added Maintenance Tasks to keep the codebase and related parts in order, including architectural improvements @ Client rendering labels Nov 9, 2025
@lhofhansl
Copy link
Contributor

I tried. And it seems to work - at least with all models I tried.
The change is a lot to review, though.

@appgurueu
Copy link
Contributor Author

Alright, made more changes based on the comments and some more things that bothered me, I think it's pretty neat now.

Unfortunately that meant I had to increase the diff by a bit, but it should be at least nicely split up now.

This is dead code: We always end up throwing the animation speed away, forcing modders to supply it.
It is also irrelevant for the future (glTF).
Copy link
Member

@SmallJoker SmallJoker left a comment

Choose a reason for hiding this comment

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

Whoa that's a lot of code.... second (static) review.
I'll try to do some tests with this PR on servers in the next few days.

@appgurueu
Copy link
Contributor Author

Thanks for taking a look! I think I have addressed everything now.

@SmallJoker SmallJoker self-requested a review November 16, 2025 20:40
Copy link
Member

@SmallJoker SmallJoker left a comment

Choose a reason for hiding this comment

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

No issues found with:

☑️ Lava flan
☑️ Several animated mobs on a server
☑️ Sam
☑️ Animated spooder

Works on my machine.

@lhofhansl
Copy link
Contributor

And I tried with Draconis and NSSM. Works fine.
It's a lot of code... I read through it and it all looks reasonable.

@sfan5 sfan5 merged commit e7f305f into luanti-org:master Nov 23, 2025
17 checks passed
@appgurueu appgurueu deleted the refactor/weights branch November 23, 2025 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

@ Client rendering Maintenance Tasks to keep the codebase and related parts in order, including architectural improvements >= Two approvals ✅ ✅

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants