GLError causing Red Screen with Shaders and Immersive Engineering
According to your testing, does the issue occur with ONLY Immersive Portals mod?
No
Forge Version
40.1.68
ImmersivePortals Version
immersive-portals-1.4.9-rc3-mc1.18.2-forge.jar
Latest Log
Wrong one provided, I will find the correct one and provide when found.
Crash Report (if applicable)
No response
Steps to Reproduce
1: Use oculus and Rubidium for shaders to work 2: Have immersive portals installed as a mod 3: Load up a world, press K to enable shaders (Mine being ComplementaryShaders_v4.5) 4: Create a nether portal or a portal of your choice, bug happens after portal renders.
What You Expected
To work as normal with shaders
What Happened Instead
Everything turned red of the side of the portal you are standing on, see pictures attached.

Additional Details
Minecraft version is 1.18.2 running the mod pack All The Mods 7, shaders work great with this pack normally. Happens in both new and old worlds.
Please Read and Confirm The Following
- [X] I have confirmed this bug can be replicated without the use of Optifine.
- [X] I have confirmed the details provided in this report are concise as possible and does not contained vague information (ie. Versions are properly recorded, answers to questions are clear).
- [X] I have confirmed this does not happen on the fabric version (If it does please report to here instead).
- [X] I have confirmed this issue is unique and has not been reported already.
I need the log, if possible also the debug log. Also, I need the exact name and version of the shader you used.
Here is the link to the shaders, they work for all versions from 1.7.x up to the newest 1.19.x, as I said I am on 1.18.2 https://minecraftshader.com/downloads/complementary
They have not been updated since I started using them.
Sorry I could not find the original log but I was able to recreate the issue, here is the log I have now. I could not however get anything of a debug log.
i have the same issue but i with any shader pack so i was assuming it could be an issue directly with occulus/iris compat but i didnt read your log to see what your using ive attempted pretty much every compatibility and rendering setting to the same results, initially i was thinking the shaders were having a problem with the dimension stack but this seams to be any time you load in any dimension with the shaders enabled you get a full red screen and only see the portals,
this is what im running into in log
Triforce Patcher] gl_FragColor is not supported yet, please use gl_FragData! Assuming that the shaderpack author intended to use gl_FragData[0]...
[17:46:26] [Render thread/WARN]: [
I use oculus, Optifine doesn't work with my game for whatever reason. Crashes the game before boot
@voxelimprint Can you please list all mods you're using and send me a full log
this happens with immersive engineering installed
[LWJGL] OpenGL debug message
ID: 0x502
Source: API
Type: ERROR
Severity: HIGH
Message: GL_INVALID_OPERATION error generated. Depth formats do not match.
Stacktrace: MC-BOOTSTRAP/[email protected]+7/org.lwjgl.opengl.GL30C.glBlitFramebuffer(Native Method)
MC-BOOTSTRAP/[email protected]+7/org.lwjgl.opengl.GL30.glBlitFramebuffer(GL30.java:1838)
TRANSFORMER/[email protected]/qouteall.imm_ptl.core.compat.iris_compatibility.IrisCompatibilityPortalRenderer.onBeforeHandRendering(IrisCompatibilityPortalRenderer.java:174)
TRANSFORMER/[email protected]/net.minecraft.client.renderer.GameRenderer.handler$zdc000$onRightBeforeHandRendering(GameRenderer.java:2162)
TRANSFORMER/[email protected]/net.minecraft.client.renderer.GameRenderer.m_109089_(GameRenderer.java:1061)
TRANSFORMER/[email protected]/net.minecraft.client.renderer.GameRenderer.redirect$zdc000$redirectRenderingWorld(GameRenderer.java:2140)
TRANSFORMER/[email protected]/net.minecraft.client.renderer.GameRenderer.m_109093_(GameRenderer.java:835)
TRANSFORMER/[email protected]/net.minecraft.client.Minecraft.m_91383_(Minecraft.java:1046)
TRANSFORMER/[email protected]/net.minecraft.client.Minecraft.m_91374_(Minecraft.java:665)
TRANSFORMER/[email protected]/net.minecraft.client.main.Main.main(Main.java:205)
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.base/java.lang.reflect.Method.invoke(Method.java:568)
MC-BOOTSTRAP/[email protected]/net.minecraftforge.fml.loading.targets.CommonClientLaunchHandler.lambda$launchService$0(CommonClientLaunchHandler.java:31)
MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37)
MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53)
MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71)
MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.Launcher.run(Launcher.java:106)
MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.Launcher.main(Launcher.java:77)
MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26)
MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23)
[email protected]/cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:149)
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.base/java.lang.reflect.Method.invoke(Method.java:568)
io.github.zekerzhayard.forgewrapper.installer.Main.main(Main.java:57)
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.base/java.lang.reflect.Method.invoke(Method.java:568)
org.polymc.impl.OneSixLauncher.invokeMain(OneSixLauncher.java:104)
org.polymc.impl.OneSixLauncher.launchWithMainClass(OneSixLauncher.java:175)
org.polymc.impl.OneSixLauncher.launch(OneSixLauncher.java:185)
org.polymc.EntryPoint.listen(EntryPoint.java:144)
org.polymc.EntryPoint.main(EntryPoint.java:74)
[LWJGL] OpenGL debug message
ID: 0x502
Source: API
Type: ERROR
Severity: HIGH
Message: GL_INVALID_OPERATION error generated. Depth formats do not match.
Stacktrace: MC-BOOTSTRAP/[email protected]+7/org.lwjgl.opengl.GL30C.glBlitFramebuffer(Native Method)
MC-BOOTSTRAP/[email protected]+7/org.lwjgl.opengl.GL30.glBlitFramebuffer(GL30.java:1838)
TRANSFORMER/[email protected]/qouteall.imm_ptl.core.compat.iris_compatibility.IrisCompatibilityPortalRenderer.onBeforeHandRendering(IrisCompatibilityPortalRenderer.java:174)
TRANSFORMER/[email protected]/net.minecraft.client.renderer.GameRenderer.handler$zdc000$onRightBeforeHandRendering(GameRenderer.java:2162)
TRANSFORMER/[email protected]/net.minecraft.client.renderer.GameRenderer.m_109089_(GameRenderer.java:1061)
TRANSFORMER/[email protected]/net.minecraft.client.renderer.GameRenderer.redirect$zdc000$redirectRenderingWorld(GameRenderer.java:2140)
TRANSFORMER/[email protected]/net.minecraft.client.renderer.GameRenderer.m_109093_(GameRenderer.java:835)
TRANSFORMER/[email protected]/net.minecraft.client.Minecraft.m_91383_(Minecraft.java:1046)
TRANSFORMER/[email protected]/net.minecraft.client.Minecraft.m_91374_(Minecraft.java:665)
TRANSFORMER/[email protected]/net.minecraft.client.main.Main.main(Main.java:205)
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.base/java.lang.reflect.Method.invoke(Method.java:568)
MC-BOOTSTRAP/[email protected]/net.minecraftforge.fml.loading.targets.CommonClientLaunchHandler.lambda$launchService$0(CommonClientLaunchHandler.java:31)
MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37)
MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53)
MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71)
MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.Launcher.run(Launcher.java:106)
MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.Launcher.main(Launcher.java:77)
MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26)
MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23)
[email protected]/cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:149)
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.base/java.lang.reflect.Method.invoke(Method.java:568)
io.github.zekerzhayard.forgewrapper.installer.Main.main(Main.java:57)
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.base/java.lang.reflect.Method.invoke(Method.java:568)
org.polymc.impl.OneSixLauncher.invokeMain(OneSixLauncher.java:104)
org.polymc.impl.OneSixLauncher.launchWithMainClass(OneSixLauncher.java:175)
org.polymc.impl.OneSixLauncher.launch(OneSixLauncher.java:185)
org.polymc.EntryPoint.listen(EntryPoint.java:144)
org.polymc.EntryPoint.main(EntryPoint.java:74)
@Lolothepro @voxelimprint @Symm3
Please send me your full log (uploaded to gist/pastebin) to help me diagnose this further.
Is there anything else you need from me @Nick1st
Is there anything else you need from me @Nick1st
No, I got everything I need for now, thanks for the report.
Awesome, I'll leave this open as I'm not the only one with the problem
https://mclo.gs/KgA3cRr https://paste.gg/p/anonymous/26d2285564a34507aeea9abf5188c5a5 https://hst.sh/ihadujefod https://0x0.st/of3u.txt
I'm at work but I'll do that as soon as I get home. I had run it just with this mod and rubbidium, Oculus for shaders.
On Wed, Aug 31, 2022, 4:10 AM Nick1st @.***> wrote:
@voxelimprint https://github.com/voxelimprint Can you please list all mods you're using and send me a full log
— Reply to this email directly, view it on GitHub https://github.com/iPortalTeam/ImmersivePortalsModForForge/issues/11#issuecomment-1232609113, or unsubscribe https://github.com/notifications/unsubscribe-auth/A2ZFSL73MCIQ6FVJBYBWZFTV34HPPANCNFSM57UCF22Q . You are receiving this because you were mentioned.Message ID: @.***>
I'm going to use this issue as my notes section on this, so feel free to ignore further messages in this thread.
It seems that there are actually two spots causing this issue. Both are in an Iris Compatibility Renderer, one in the method called without any portals visible, the other one in the method for rendering when a portal is visible.
Ok, so the method I'm going to focus on first, is the one without visible portals. (https://github.com/iPortalTeam/ImmersivePortalsModForForge/blob/b2c68ee818ed4cc91615de3a824c32d4947e5a8f/imm_ptl_core/src/main/java/qouteall/imm_ptl/core/compat/iris_compatibility/IrisCompatibilityPortalRenderer.java#L163-L194)
Diagnosing the issue: GL_INVALID_OPERATION error generated. Depth formats do not match.
Quick-Random-Doc-Link: https://registry.khronos.org/OpenGL-Refpages/gl4/html/glBlitFramebuffer.xhtml
Edit: Removing the GL11.GL_DEPTH_BUFFER_BIT form the Mask actually seems to fix the red screen, though it of course causes problems when looking at a portal.
Immersive Engineering contains some core shaders, having a look at https://github.com/IrisShaders/Iris/issues/1403 this might cause issues.
Note, there is a mismatch in the iris DepthBuffer Version between the Main Target and the SecondaryFrameBuffer and I'm not sure if that's normal, but I suppose not.
Additional Debug Log:
java.lang.Throwable
at TRANSFORMER/[email protected]/com.mojang.blaze3d.platform.GlDebug.handler$zcg000$onLogging(GlDebug.java:522)
at TRANSFORMER/[email protected]/com.mojang.blaze3d.platform.GlDebug.printDebugLog(GlDebug.java:117)
at MC-BOOTSTRAP/org.lwjgl.opengl/org.lwjgl.opengl.GLDebugMessageCallbackI.callback(GLDebugMessageCallbackI.java:39)
java.lang.IllegalStateException: Tried to use destroyed RenderTargets
at TRANSFORMER/[email protected]/net.coderbot.iris.rendertarget.RenderTargets.get(RenderTargets.java:99)
at TRANSFORMER/[email protected]/net.coderbot.iris.samplers.IrisSamplers.lambda$addRenderTargetSamplers$0(IrisSamplers.java:42)
at TRANSFORMER/[email protected]/net.coderbot.iris.gl.sampler.SamplerBinding.update(SamplerBinding.java:19)
at TRANSFORMER/[email protected]/net.coderbot.iris.gl.program.ProgramSamplers.update(ProgramSamplers.java:43)
at TRANSFORMER/[email protected]/net.coderbot.iris.compat.sodium.impl.shader_overrides.IrisChunkShaderInterface.setup(IrisChunkShaderInterface.java:73)
at TRANSFORMER/[email protected]/me.jellysquid.mods.sodium.client.render.chunk.ShaderChunkRenderer.handler$bff000$iris$begin(ShaderChunkRenderer.java:569)
at TRANSFORMER/[email protected]/me.jellysquid.mods.sodium.client.render.chunk.ShaderChunkRenderer.begin(ShaderChunkRenderer.java)
at TRANSFORMER/[email protected]/me.jellysquid.mods.sodium.client.render.chunk.RegionChunkRenderer.render(RegionChunkRenderer.java:70)
at TRANSFORMER/[email protected]/me.jellysquid.mods.sodium.client.render.chunk.RenderSectionManager.renderLayer(RenderSectionManager.java:294)
at TRANSFORMER/[email protected]/me.jellysquid.mods.sodium.client.render.SodiumWorldRenderer.drawChunkLayer(SodiumWorldRenderer.java:221)
at TRANSFORMER/[email protected]/net.minecraft.client.renderer.LevelRenderer.renderChunkLayer(LevelRenderer.java:7945)
at TRANSFORMER/[email protected]/net.minecraft.client.renderer.LevelRenderer.renderLevel(LevelRenderer.java:1388)
at TRANSFORMER/[email protected]/net.minecraft.client.renderer.GameRenderer.renderLevel(GameRenderer.java:1073)
at TRANSFORMER/[email protected]/qouteall.imm_ptl.core.render.MyGameRenderer.lambda$switchAndRenderTheWorld$0(MyGameRenderer.java:177)
at TRANSFORMER/[email protected]/qouteall.imm_ptl.core.render.MyGameRenderer.switchAndRenderTheWorld(MyGameRenderer.java:175)
at TRANSFORMER/[email protected]/qouteall.imm_ptl.core.render.MyGameRenderer.renderWorldNew(MyGameRenderer.java:65)
at TRANSFORMER/[email protected]/qouteall.imm_ptl.core.compat.iris_compatibility.IrisCompatibilityPortalRenderer.invokeWorldRendering(IrisCompatibilityPortalRenderer.java:135)
at TRANSFORMER/[email protected]/qouteall.imm_ptl.core.render.PortalRenderer.renderPortalContent(PortalRenderer.java:188)
at TRANSFORMER/[email protected]/qouteall.imm_ptl.core.compat.iris_compatibility.IrisCompatibilityPortalRenderer.doRenderPortal(IrisCompatibilityPortalRenderer.java:100)
at TRANSFORMER/[email protected]/qouteall.imm_ptl.core.compat.iris_compatibility.IrisCompatibilityPortalRenderer.renderPortals(IrisCompatibilityPortalRenderer.java:207)
at TRANSFORMER/[email protected]/qouteall.imm_ptl.core.compat.iris_compatibility.IrisCompatibilityPortalRenderer.onBeforeHandRendering(IrisCompatibilityPortalRenderer.java:185)
at TRANSFORMER/[email protected]/net.minecraft.client.renderer.GameRenderer.handler$zdc000$onRightBeforeHandRendering(GameRenderer.java:2174)
at TRANSFORMER/[email protected]/net.minecraft.client.renderer.GameRenderer.renderLevel(GameRenderer.java:1073)
at TRANSFORMER/[email protected]/net.minecraft.client.renderer.GameRenderer.redirect$zdc000$redirectRenderingWorld(GameRenderer.java:2152)
at TRANSFORMER/[email protected]/net.minecraft.client.renderer.GameRenderer.render(GameRenderer.java:847)
at TRANSFORMER/[email protected]/net.minecraft.client.Minecraft.runTick(Minecraft.java:1070)
at TRANSFORMER/[email protected]/net.minecraft.client.Minecraft.run(Minecraft.java:668)
at TRANSFORMER/[email protected]/net.minecraft.client.main.Main.main(Main.java:205)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at MC-BOOTSTRAP/[email protected]/net.minecraftforge.fml.loading.targets.ForgeClientUserdevLaunchHandler.lambda$launchService$0(ForgeClientUserdevLaunchHandler.java:24)
at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37)
at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53)
at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71)
at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.Launcher.run(Launcher.java:106)
at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.Launcher.main(Launcher.java:77)
at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26)
at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23)
at [email protected]/cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:149)
The issue is that the new versions of Iris contain a lot of bug fixes, but Oculus is not updated too much and no longer contains the Iris fixes.
Ok, so the issue is actually caused by Immersive Engineering using stencil buffers, creating a mismatch in the Depth formats of the target and secondary frame buffer used by Immersive Portals. (There is some guessing in there, so take this with a grain of salt.)
Setting
#Set to false to disable the stencil buffer. This may be necessary on older GPUs.
stencilBufferEnabled = false
in Immersive Engineerings config will fix the issue for now, while I'm trying to patch this.
Note to myself: https://github.com/IrisShaders/Iris/commit/f5d3a6dc4a51e014d618b4dfed6092ac62a82e40
I am planning to use a different way to copy stencil to get better compatibility with some videocards.