Game Crash with Sodium and Immersive Engineering when setting a garden cloche
zuken1997 opened this issue · 9 comments
Bug Description
Hello i have a problem (1.21.1) with the new engineering version, I placed a garden cloche on my server and after that my game crashed. it looks like it's a bug with sodium, can you fix it please?
Versions:
ImmersiveEngineering-1.21.1-12.0.0-182
Sodium 0.6.0 Beta 2 for NeoForge
Reproduction Steps
I place a garden cloche from Immersive Engineering, when I place dirt and melons in the garden cloche the game crashes afterwards, I can no longer access my server because the game crashes every time due to the sodium renderer. See crash log.
Log File
crash-2024-10-20_22.53.01-client.txt
Crash Report
(https://github.com/user-attachments/files/17455444/crash-2024-10-20_22.53.01-client.txt)
It looks like this is the problem
The class blusunrize.immersiveengineering.client.utils.TransformingVertexBuilder does not implement interface VertexBufferWriter, which is required for compatibility with Sodium (see: #1620)
https://gist.github.com/zuken1997/4adb17dfc4a6213a6ec302b62f2bd8dc
This is in github.. sorry
And what can i do for this Problem?
the immersive engineering developer said: That needs to be fixed in sodium.
I don't understand why Immersive Engineering is using their TransformingVertexBuilder
in particle rendering when no part of it appears to get used. Particle rendering doesn't use overlays or normals, but they use their implementation of VertexConsumer
to modify those.
If they are relying on undoing the camera transform, it should be possible to just update the particle's position before rendering and then restore them after, which avoids the performance penalty of wrapping every vertex + allows their mod to benefit from optimizations in Sodium.
For that matter, why do they even have custom particle rendering? Would it not be sufficient to simply add the particles to the world renderer like anything else? My only guess is they want the particles to stop rendering when the block entities are destroyed, but I'm not sure.
It would seem sufficient to just sub-class the particles they want to render (i.e. with a delegate) and then on the tick()
function, destroy them when the tile entity no longer exists.
Unless someone can provide some insight on why it's being done this way, it is unlikely I'm going to consider implementing workarounds to accommodate Immersive Engineering, since it will hurt performance a lot.
Per my comments here, a pull request to fix this problem has been opened by someone on our team: BluSunrize/ImmersiveEngineering#6079
This should improve performance with or without Sodium being installed, and will ensure compatibility between the mods while also enabling Sodium's additional optimizations.