Sodium

Sodium

61M Downloads

request help on fork

Mr-Squid42 opened this issue ยท 4 comments

commented

sorry if this is not the best place to request this, but there is something i'm trying out but have gotten stuck on.

inspiration:
https://www.youtube.com/watch?v=YNFaOnhaaso&t=153s

what i've done so far:
https://github.com/Mr-Squid42/sodium_test_fence_optimization

for the first optimization:
i've updated DefaultChunkRenderer.java

for the second optimization:
i've updated RenderSectionManager.java and SodiumWorldRenderer.java

i tried the second optimization first as this i could easily make sense of it compared to the first, both in intellij idea environment and in a prism instance, worked fine, even got a reasonable reduce in frame stutters compared to default sodium when rendering new meshes, i am aware that you seem to already added a check for updates in the needsUpdate function, so part of this may be duplicate logic

problem is when i tried to implement the first 2 mesh optimization, which i couldn't easily make sense of due to sodium's code distributed across quite a few files, in the intellij environment it worked fine, but for some reason in the prism instance it kept crashing on world load, what i want to know is, have i implemented it in the right place and if i have, then how do i fix the crash?

crash-2025-09-07_17.18.00-client.txt

to be honest, i don't think i've implemented the first optimization correctly, as to apply it to sodium, it seems would need access to 2 meshes from the same chunk, one old mesh and one updated mesh, how i've implemented it means it is likely working on 2 different chunks

commented

Can you elaborate in detail what you exactly it is you are doing and why it is a good idea? I would also like to note that generally when somebody wants to do work on these core parts of sodium they consult with us in #dev-sodium in our discord server to receive important feedback on the viability of the idea and whether we even want their contribution in the first place.
I'm going to close this issue as it's neither a feature request, tracking issue, nor bug with Sodium itself.

commented

well somethings i will need to say, the video i've linked suggest some optimizations to reduce stutters for mesh updates to almost zero, the first idea is to do something similar to double buffering, in which it checks for mesh completion and renders either mesh A or mesh B, basically allowing it to work on one mesh while rendering another, the second one is to skip mesh update calls if a mesh is already updating(somewhat done already done in base sodium) or if a mesh is rendering, i'm stuck on the 1st idea, also i don't seem to have permission to post anything on #dev-sodium and i do see a notice that says [Please don't ask for help/support here.] on that, also i'm testing this out first on my own fork as to see if there is any practical benefits to doing this, i made this post as i am no where good enough a programmer to fix this crash

commented

We can discuss things in #programming as well, if you're not sure if it belongs in dev-sodium

commented

thanks