Optimize the rendering of Structure Void/Air with structure blocks
TelepathicGrunt opened this issue ยท 9 comments
Hello! I was wondering if it would be within the scope of Sodium to optimize the rendering of structure void/air as I have a world with a ton of structure blocks rending those blocks. And well, my performance was at 15 fps when at a render distance of 7, clouds off, fast graphics, yeah.
I put on lithium, phosphor, and sodium all together and my fps only improved to 20 fps. Even in vanilla, the moment I turn on "show invisible blocks" on structure blocks, my fps just dies lol.
Here's a picture showing the performance dying thanks to Mojang's structure void/air rendering:
I hope this can be optimized as it would be immensely helpful!
Here's a video demonstrating in a completely blank superflat world in 1.16.2 Fabric with no mods, that a single 48x48x48 structrue block will murder fps when show invisible blocks is turned on
https://streamable.com/qh05b7Edit: Here's a better video with no slimes and v-sync off.
https://streamable.com/n33vcu
This should optimize Mojang
Here's a video demonstrating in a completely blank superflat world in 1.16.2 Fabric with no mods, that a single 48x48x48 structrue block will murder fps when show invisible blocks is turned on
https://streamable.com/qh05b7
Edit: Here's a better video with no slimes and v-sync off.
https://streamable.com/n33vcu
Why is it in the pictures where you have low fps, you are using the intergrated graphics, but in those videos, you are using your dedicated graphics card? That may be the issue.
The original pictures were before I set minecraft to use the dedicated graphics card but even then, no matter which it uses for graphics, Structure Block's invisible block rendering destroys performance 100% of the time.
It's not hard to even test it too. Just copy what I did in the video with your rig and it'll struggle with the 48x48x48 size structure block lol
I have made an issue report to mojang here as well but it'll take a long time for them to fix it if they ever get around to it. https://bugs.mojang.com/browse/MC-198175
I've done my best to improve this issue with cb2c905, but it's not going to be entirely cured by the patch. Ultimately, this geometry needs to be cached so it's not re-built every frame, but there's no mechanism to allow us to do that right now.