Immersive Portals breaks Minecraft's depth buffer clearing when using IrisPortalRenderer
coderbot16 opened this issue ยท 5 comments
This unbindWrite call happens right before RenderSystem#clear in LevelRenderer. This breaks with the upcoming Iris 1.2.5 update:
Can you explain how does Iris change the way of binding framebuffer and clearing?
Iris 1.2.5 uses the Minecraft depth buffer from the main render target and expects it to be cleared normally in LevelRenderer, but it clears its own color buffers separately after Minecraft's buffer clearing has taken place. Notably, Iris only explicitly clears the shader color buffers.
Previously this problem was hidden because Iris used its own depth buffer and cleared it, but this is no longer the case, which exposed the issue in this Iris-specific code path in immersive portals.
The Iris framebuffers use the depth attachment from Minecraft's main render target along with Iris's own shader color attachments.