Sodium Reloaded (Unofficial)

Sodium Reloaded (Unofficial)

0 Downloads

1.17rc: VT Bushy leaves performance drop after loading many chunks

MeeniMc opened this issue ยท 3 comments

commented

Read me before you open an issue!


Version Information

mc 1.17
[email protected]+rev.2c2f389-dirty (newmalloc4, but I have observed this as far back as build.438 for sure, and maybe build.434 also)

Vanilla Tweaks "Bushy leaves" resource pack: I think the issue is not in the RP, but in the way it makes the geometry insanely complex in jungle biomes, which exercise an otherwise silent/low-key resource exhaustion/leakage performance bug.

Problem behavior

Performance (FPS, and Chunk loading speed) goes down the drain when using Bushy leaves and loading lots of chunks:

  1. After loading the game, not changing the viewport direction performance is fine
  2. Doing a 360 (no player motion otherwise), chunk loading is slow, and performance gets increasingly worse
  3. Returning to the same viewport orientation as 1., the FPS is now significantly worse, and doesn't improve with time; VRAM usage is very high and the number of 'regions' is also much higher than in step 1.

Expected Behavior

Performance of step 3 should return to the same as step 1 after some reasonable amount of time for GC/cleanup to happen.

Ideally, performance overhead of step 2 should be commensurate with the amount of extra geometry in bushy leaves (say FPS divided by two across the board), not go crazy slow, stuttery and jumpy, even temporarily. Without the Bsuhy-leaves, doing the 360 and loading chunks is a breeze with steady and high FPS at all times.

Reproduction Steps

  1. MC 1.17, Sodium rc, Vanilla Tweaks 'bushy leaves' resource pack
  2. World Seed: 1
  3. tp 646 217 -238 looking toward -10.7 -15.8
  4. let game load all chunks, note FPS is steady (slower than without VT bush leaves, but that's normal)
    2021-07-04_10 58 57
  5. player do a 360, note that FPS becomes very unsteady and chunk loading is slow
  6. player face same viewport as step 4, FPS is bi-modal and slow, doesn't revert back to normal (i.e., step 4)
    2021-07-04_11 00 01
  7. Hit f3+a to reload all chunks, performance reverts to normal (repeat step 5 to make it worst again)
    2021-07-03_18 40 06

Comparison with bug not causing performance issues (without Bushy leaves)

For comparison, a set of pictures without Bushy Leaves, as a reference point

2021-07-04_10 56 34
2021-07-04_10 57 18
2021-07-04_10 57 51

System Information

Win10-64 AMD RX 580 (8G)

Other Information

Other mods present (issue verified to happen also without them, but they help debugging by making the game load faster)
- [email protected]
- [email protected]
- [email protected]+1.17
- [email protected]
- [email protected]
- java@16
- [email protected]
- [email protected]
- [email protected]+dev.22
- [email protected]
- [email protected]
- [email protected]
- [email protected]+1.17
- [email protected]
- [email protected]+fabric.2b7d7ae

commented

0.3.1 improves another whole lot. I see a maximum of 20% perf drop after doing the 'full circle' as described in the original ticket. As per usual, not using bushy leaves, using cull-leaves, or lower render distances, or area with less intensive geometries do not suffer from the defect.

commented

The problem lies in the fact that foliage transparent foliage is rendered to all areas on a large rendering
The only fix
This is to make the foliage fast beyond 16 chunks
This will not ruin the quality of the picture, as the foliage looks like a fast one due to antialiasing.
But at the same time, the video card renders as beautiful, thereby placing a heavy load on the video card

commented

Build 480 improves a lot on this issue; although it is not completely fixed, it is greatly mitigated.

In combination with the addon "Cull Leaves", which does reduce the geometry of bushy leaves, the compaction algorithm has ample time to cleanup before we run out of memory, and performance is completely normal in even the most abusive scenes. So for future users stumbling upon this issue, that's a potential solution if you experience poor performance with bushy leaves.