Open Felix14-v2 opened 3 months ago
This is a Vanilla bug to some extent. its not the same behaviour as sodium but neither vanilla or sodium have a guarentee on rendering these entitites. This does not seem to be a result of entity culling.
Not exactly sure whats happening but my guess is sometimes the section under is considered visable in some locations and not visable in others. which means this behaviour depends on a section being marked visable when its not.
Our renderer will construct a bounding box around the entity and then scan the entire volume to determine if there are any visible sections intersecting with it. What seems to be going wrong is that armor stands have no dimensions, which makes it so that Sodium will only check the section which intersects the entity's origin point (the feet.)
The fact this requires the chunk to be unloaded and loaded makes me think there is a serialization bug with Armor Stands which causes their bounding box to be initialized incorrectly.
Our renderer will construct a bounding box around the entity and then scan the entire volume to determine if there are any visible sections intersecting with it. What seems to be going wrong is that armor stands have no dimensions, which makes it so that Sodium will only check the section which intersects the entity's origin point (the feet.)
should have also included a screenshot of what the test world looks like as there wasnt one in the original issue. as theres other entitites in there too. i didnt check too much but im pretty sure nothing is even getting to isEntityVisible
, as the toggle for entity culling doesnt change it.
nvm they are actually all going into the isEntityVisible, seem to have the right bounding box and returning true.
should have also included a screenshot of what the test world looks like as there wasnt one in the original issue
I thought the video demonstrating the test world would be enough ._.
Bug Description
In some scenarios, if an entity is partially hidden in a culled chunk section, the entity model can become invisible until you forcefully load the chunk section.
Demo
https://github.com/user-attachments/assets/a0998bef-0e81-4412-a912-d6a524b7a97a The interesting part is that disabling the "Entity culling" option does nothing: https://github.com/user-attachments/assets/cf2c41db-c850-409a-979a-abaeaaa8d22aReproduction Steps
Preparing the area (you can just load the attached world)
/fill -1 -1 -1 16 16 16 stone
)/summon minecraft:armor_stand 5 17 5 {NoGravity:1b}
)/execute as @e[type=minecraft:armor_stand] at @s run tp ~ ~-1.001 ~
)Debug info
latest.log crash-2024-08-20_22.41.21-client.txt
Additional
I heard about this behavior from a server administrator, who complained to me that Sodium is breaking decorations on his server. I debugged it a bit and found this bug. So this may be a real-world scenario, not just a limited edge case.
https://github.com/user-attachments/assets/a1199ebc-4670-4285-bdb7-299aeafe7157
Lobby.zip
By the way, you can see another issue with the entity shadowing in the video above (0:02-0:03), but that's unrelated.