Sodium

Sodium

44M Downloads

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

Sollace opened this issue ยท 4 comments

commented

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.

commented

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

commented

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.

commented

ok, got it. I hope you can solve this

commented

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