Entity Culling Fabric/Forge

Entity Culling Fabric/Forge

138M Downloads

Fabric 1.21.9/10 renderNametagsThroughWalls not working + incompatibility with Armor Stands mod

Closed this issue · 2 comments

commented

In the update to 1.21.9, you made a change in your WorldRenderer mixin that effectively swapped all render states for culled entities with placeholder invisible armor stand ones, but this caused an incompatibility with my Armor Stands mod, in particular when it comes to name tag rendering for culled armor stands.

All other changes aside the renderNametagsThroughWalls config option doesn't seem to be checked anymore as of 1.21.9, making it non-functional.

However I suspect replacing all culled entities' render states with fake invisible armor stand ones will have other side effects with any mod that modifies entity rendering (like my Custom Paintings mod) but I haven't done enough testing to know. My mod is using info from inside the render state like the targeted entity and distance to camera to improve nametag rendering for armor stands, but even that is bypassed (and a little convoluted) i.e. when calling entity.shouldShowName() rather than state.hasLabel(T, double).

For now as a workaround I'll be telling my users to disable culling armor stands entirely, but for some users they are actually a pretty significant performance hog so a better solution would definitely be ideal.

commented

Ah, this would explain why I was seeing invisible armor stands flickering in my ender pearl stasis chambers.

commented

Yep, the armorstands being visible was a bug (#246 ) that is now fixed.

The renderNametagsThroughWalls option is a good question, as it never worked that nicely, but I'll add the line back for now. (Stuff that ignores culling also ignores this flag, so 🤷)

For the last point, it's tricky. entity.shouldShowName() is used, because there is no state yet. Extracting the state of the real entity to then make a fake state for the culling removes a big part of the performance improvement due to all the overhead. The nametag logic always has been a bit of a nightmare in terms of mod compatibility, was really hoping for it to be better than before 😅 . Refactored it a bit to use ShouldShowName from the LivingEntityRenderer, I hope that fixes that issue. Reopen if not, or best case contact me on discord.