Skip to content
Fx Morin edited this page Jul 16, 2022 · 8 revisions

Aggressive BlockState Culling

Blockstate culling is how the game culls faces of blocks that you can't see. Although the game only supports culling non-full block faces against full blocks. Leading to many of the block faces not being culled, slowing down your render time.
There are many places in the game that naturally have many of these non-full block culling issues, a couple of examples would be: Bamboo forest (bamboo), end islands (chorus plants), and many decoration structures (villages, mansions).

MoreCulling is able to cull these faces without a performance loss allowing you to get better frame rates.

Comparing Performance

Results may vary drastically!
Without MoreCulling, I get around ~136 frames
Vanilla
With MoreCulling, I get around ~210 frames
MoreCulling
Don't mind that bar, it was a screenshot.
Do not expect these results all the time. Bamboo renders 2 extra faces for each block without MoreCulling, which is why the results are so drastic here!

W.I.P. - More performance examples are needed here

How do we achieve this?

This is done by running voxel face checks against both blocks and checking if they overlap. If one fully overlaps a face, we can prevent that face from rendering.
We do this exactly how Mojang does normal face culling against solid blocks except by comparing both faces together.

Why does Mojang not also do this?

There is one good reason why Mojang has not done this themselves. Some faces use transparency in their textures.
That may not sound that bad although it is, without this check trapdoors can be used to xray through the world. The game does not have any way of knowing that the trapdoors face isn't solid so it culls its back.
MoreCulling runs a transparency check on all block faces when the game starts (unnoticeable) that gets cached as a boolean in BakedModels. This gives the game a way to very quickly check if the block can use MoreCulling's aggressive culling to remove extra faces.

Current bugs fixed by MoreCulling's aggressive culling

  • MC-249693 - Chorus plant culling
  • MC-238739 - Bamboo culling (without leaves)
  • MC-209633 - Glass pane culling
  • MC-139620 - Fence culling (some exceptions)
  • MC-217653 - End Rod culling (some exceptions) Plus a lot more that haven't been reported or tested
Clone this wiki locally