Sodium

Sodium

35M Downloads

Optimize the rendering of Structure Void/Air with structure blocks

TelepathicGrunt opened this issue ยท 9 comments

commented

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:
image

I hope this can be optimized as it would be immensely helpful!

commented

disable Vsync

commented

Disabling V-sync did not solve the issue and I am not sure how it would had anyway.

Pic below is using almost vanilla (no optimization mods) without v-sync:
image

Pic with sodium, phosphor, and lithium without v-sync:
image

commented

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

This should optimize Mojang

commented

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

commented

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.

commented

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

commented

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

commented

I just started doing larger structure pieces and this bug is really killing me lol. It gotten so bad that I couldn't even switch to flying in Creative Mode due to the lag in recognizing key presses. Shame mojang marked this as low priority on their bug tracker
image

commented

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.

Before: before.png
After: after.png