Sodium Reloaded (Unofficial)

Sodium Reloaded (Unofficial)

0 Downloads

Display entities with large width/height make entity culling incredibely slow

opl- opened this issue ยท 1 comments

commented

Bug Description

And I do mean slow: 1.5s per frame!

Reproduction Steps

  1. Enable entity culling in Sodium options.
  2. /summon minecraft:item_display ~ ~ ~ {"item":{"id":"minecraft:red_dye","Count":1b},"transformation":{"translation":[0.0,0.0,0.0],"right_rotation":[0.0,0.0,0.0,1.0],"scale":[1.0,0.0,1.0],"left_rotation":[0.0,0.0,0.0,1.0]},"width":9999,"height":9999}
  3. Optional: disable entity culling to return to playable FPS.
  4. /kill @e[type=minecraft:item_display,sort=nearest,limit=1,distance=..10]

Log File

N/A (No other performance mods loaded.)

Crash Report

N/A

commented

I would guess this is caused by the entity culling system checking every chunk the entity spans for visibility:

https://github.com/CaffeineMC/sodium-fabric/blob/dff676d88298add15a9fd0b66153ca4197959097/src/main/java/me/jellysquid/mods/sodium/client/render/SodiumWorldRenderer.java#L409-L417

A fix might be to skip this check if the entity exceeds a certain "large" threshold.