Cave Culling
StockiesLad opened this issue ยท 14 comments
Is your feature request related to a problem? Please describe.
The lack of cave culling reduces performance when looking at the ground. As well as providing headroom for a bunch of exploits when a blackface isn't rendered correctly.
Describe the solution you'd like
For caves to be culled. As in, blockfaces that contact airblocks, but are obstructed by opaque blocks on the pathway to the camera's visibility, get culled.
Describe alternatives you've considered
Haven't really found any tbh.
Sodium already does occlusion culling. Is there a particular case you're seeing where it's not working correctly?
It is easy to see that it doesn't cull caves when directly looking at it. It can easily be tested by glitching out a block without the blockface loading, where you can see all the caves
So what you're saying is that when the game doesn't think there's a block there, Sodium treats it as if there is no block there? :)
You'll see the same behaviour in vanilla.
You mentioned performance issues - do you have any examples of this?
I tested by getting rid of the glitched blockfaces. Then I looked at where I knew there were no caves, 120FPS. Then I looked at the part of the wall with caves behind it, 100FPS.
The culling algorithm isn't perfect, but keep in mind that it will disable itself in modes where you can see through the ground, like in spectator mode, to maintain consistency with vanilla. If you didn't get this screenshot in spectator mode, it would be appreciated if you sent the seed and location where this happens so I can try replicating it.
I just want to mention that I didn't do this in spectator mode, it was in creative.
invisiblestone.zip
Install moreculling & use this resourcepack (to make stone bricks invisible) and you can test it all you want. It happens on any seed
This is not some bug that only happens with shaders. I tested by simply standing in a random area. then placed all these "empty" blocks, no FPS change