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

Incompatibility with Mson (and simillar mods that change ModelPart.Cuboid) #1627

Open
Sollace opened this issue Feb 17, 2023 · 4 comments
Open
Labels
A-mods Area: Mod compatibility F-help-wanted Flag: Help wanted

Comments

@Sollace
Copy link

Sollace commented Feb 17, 2023

Sodium is completely clobbering the contents of ModelPart.Cuboid, ModelPart.Quad, and overwriting ModelPart.renderCuboids and replacing it with their own implementations which means mods that generate models with vertices that are customised in any way will not render as intended with Sodium.

As far as I can tell, there is no straightforward way to fix this from my end. Ideally, it would be good if Sodium could find a way to implement their performance optimisations without creating a parallel duplicate.

Sollace added a commit to MineLittlePony/Mson that referenced this issue Feb 17, 2023
@jellysquid3 jellysquid3 added A-mods Area: Mod compatibility F-help-wanted Flag: Help wanted labels Jan 29, 2024
@GrinlexGH
Copy link

has it still not been fixed? I can't wait for my emotions to work properly.

@jellysquid3
Copy link
Member

There's no solution currently. In all honesty, what solution we're looking for isn't apparent to me either. The optimizations are very helpful, and are mostly enabled by the changes in memory layout (as otherwise cache misses because a huge performance issue.)

We could perhaps try to delay when we capture the vertex data (so the copy happens after other mods touch it), but I don't think it will fix all issues.

@GrinlexGH
Copy link

ok, got it. I hope you can solve this

@Sollace
Copy link
Author

Sollace commented Apr 15, 2024

This was actually fixed from Mson's side by sub-classing ModelPart and overriding the render() method with custom logic.

Probably not the best solution but it was the only way I could find as later sodium updates made compatibility otherwise impossible.

https://github.com/MineLittlePony/Mson/blob/1.20.2/src/main/java/com/minelittlepony/mson/impl/fast/FastModelPart.java

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-mods Area: Mod compatibility F-help-wanted Flag: Help wanted
Projects
None yet
Development

No branches or pull requests

3 participants