Waterlogged stairs cause z-fighting
LucilleTea opened this issue ยท 4 comments
Expected Behavior
Water should not be visible through the back of the stair.
Actual Behavior
The water and the stair z-fight. This happens regardless of the Compact Vertex Format, or Chunk Renderer, or any other setting in the advanced tab (and does not happen without sodium).
Reproduction Steps
Waterlog some stairs, move >30 blocks away from them, facing their back (for me, Jokbon's screenshot doesn't look quite as far).
Attachments
System Information
- Java Version: AdoptOpenJDK Java 15 64-bit
- CPU: i7 3770
- GPU: GTX 1070
- OS: Windows 10
Using Sodium 0.1.1-SNAPSHOT in my case, Jokbon seems to be on the stable release.
Isn't this a vanilla bug? Are more sides of stairs Z fighting, or are they Z fighting more severely?
I could not reproduce it in the same situation without sodium running, like I said. It may have happened in previous versions or in different circumstances.
Edit: Just confirmed with true vanilla 1.16.4, i don't see the issue there either. So that rules out Indigo fixing it.
While dealing with a similar bug in iris (IrisShaders/Iris#242) i found the code that causes this.
In sodiums FluidRenderer.render
function while testing if sides are exposed the isFluidExposed
function only tests if the next block contains the same fluid as the current block. Vanillia minecraft has an additional test for self occlusion which is implemented in FluidRenderer.method_290710
.