Immersive Portals

Immersive Portals

5M Downloads

Immersive Portals breaks Minecraft's depth buffer clearing when using IrisPortalRenderer

coderbot16 opened this issue ยท 5 comments

commented
commented

Yep, I believe that should work.

commented

Can you explain how does Iris change the way of binding framebuffer and clearing?

commented

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.

commented

The Iris framebuffers use the depth attachment from Minecraft's main render target along with Iris's own shader color attachments.

commented

So all I need is to re-bind the vanilla framebuffer, so vanilla clearing will work, right?