Iris Shaders

Iris Shaders

36M Downloads

GBuffer blend mode "leaks" into the post-processing pipeline

moyongxin opened this issue ยท 2 comments

commented

What happened?

In the case of sixthsurge/photon#33:

// shaders.properties
blend.gbuffers_hand_water.colortex0            = SRC_ALPHA ONE_MINUS_SRC_ALPHA ONE ZERO

When this line is commented, the problem seems to be fixed.
I guess that the blend mode "leaks" into the post-processing pipeline so that the first frame after switching to stained glasses gets pure white.

Screenshots

No response

Log output

No response

Minecraft Version

Minecraft 1.20.1

Iris Version

iris-mc1.20.1-1.6.8.jar

Operating System

Windows 11

What is your GPU?

Nvidia Geforce RTX 3050 Laptop

Additional context

No response

commented

net.coderbot.iris.gl.IrisRenderSystem.enableBufferBlend() will enable glBlend without notify GlStateManager, and when calling RenderSystem.disableBlend() before composite program, GlStateManager.BLEND.mode.enabled might be false even blend is enabled due to GL32C.glEnablei() call in enableBufferBlend(), and then GlStateManager will considered blend is already false, and finish GlStateManager.BooleanState.setEnabled() without calling GL11.glDisable.
disableBufferBlend() in same class have the same issue, tho it might not affect shaders so much like enableBufferBlend(), and disable single buffer blend might not need to set global blend to false.

commented

Fixed; Iris will consider it's state "unknown" and honor any future set regardless of state.