Issue with DepthColorStorage lock
What's the point of
MixinGlStateManager_DepthColorOverride.iris$colorMaskLock
checking DepthColorStorage.isDepthColorLocked()
and calling DepthColorStorage.deferColorMask
?
I'm having an issue because it prevents my mod (Better Clouds) from changing the mask when rendering clouds.
This was not an issue in previous versions, but I don't exactly know when it became one.11 Replies
Pinging @IMS as this concerns mod development.
The whole point is to prevent that
It’s to avoid mod objects mixing with Iris rendering
Iris has an “unknown shader override” (ctrl + G in pack list or turn on via Iris.getIrisConfig) to bypass this
Does enabling this cause performance or compatibility concerns?
To ensure compatibility my mod tries to have all global state exactly as vanilla would, when my drawing is done. This really breaks it. Maybe I shouldn't use the glstatemanager, so direct OpenGL calls, and then reset it the OpenGL state to the glstatemanager state
well, that's the opposite of compatibility
the override is specifically there to ensure state is kept clean
enabling it doesn't hurt performance at all
It has worked pretty well so far
But there must be some tradeoff right? Otherwise it would always be on
no, there's no tradeoff
it's just there to make sure stuff doesn't accidentally corrupt rendering
which has happened
Hm, okay I'll consider it. But do you think saving and restoring the OpenGL state would really break stuff? The way I see it my mod should be 'invisible'.
it probably wouldn't break stuff
but it would cost performance
I need to do unnecessary state updates anyway, because of other mods. And glColorMask etc are cheap to call from what I know. But since iris is the larger mod I'm inclined to do what you think is best.
Just to be sure, I probably can't just enable that for some part of rendering, right? (Like for one part of the frame graph)
I don’t think you can, don’t remember
Haven’t touched Iris (1.0) in a few weeks
Okay, thanks. I'll have a closer look tomorrow
What if I just unbind the current
GlProgram
before my rendering? I don't actually use minecrafts shader classes, and I don't modify any vanilla shaders or the GL state of a RenderPipeline
. If Iris' protection is just to stop mods from messing with those, and I don't intend to mess with those, maybe the better solution is for me to unbind mc's shader stuff beforehand. I'm just not sure if that's what iris intends.