GLError causing Red Screen with Shaders and Immersive Engineering
liviniumnetwork opened this issue · 29 comments
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
- I have confirmed this bug can be replicated without the use of Optifine.
- 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).
- I have confirmed this does not happen on the fabric version (If it does please report to here instead).
- I have confirmed this issue is unique and has not been reported already.
[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.
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.
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]: [] Unsupported uniform: vec4 imm_ptl_ClippingEquation
[17:46:26] [Render thread/WARN]: [] Unsupported uniform: vec4 imm_ptl_ClippingEquation
[17:46:26] [Render thread/WARN]: [] Unsupported uniform: vec4 imm_ptl_ClippingEquation
[17:46:26] [Render thread/INFO]: [Immersive Portals]Switched to compatibility portal rendering mode. Portal-in-portal wont' be rendered
[17:46:26] [Render thread/INFO]: [CHAT] [Immersive Portals]Switched to compatibility portal rendering mode. Portal-in-portal wont' be rendered
[17:46:26] [Render thread/INFO]: switched to renderer class qouteall.imm_ptl.core.compat.iris_compatibility.IrisCompatibilityPortalRenderer
[17:46:26] [Render thread/INFO]: Destroying pipeline OVERWORLD
[17:46:26] [Render thread/INFO]: Destroying pipeline NETHER
[17:46:26] [Render thread/INFO]: Secondary Framebuffer init
[17:46:26] [Render thread/INFO]: Creating pipeline for dimension OVERWORLD
[17:46:26] [Render thread/WARN]: [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]: [] Unsupported uniform: vec4 imm_ptl_ClippingEquation
[17:46:26] [Render thread/WARN]: [] Unsupported uniform: vec4 imm_ptl_ClippingEquation
[17:46:26] [Render thread/WARN]: [] Unsupported uniform: vec4 imm_ptl_ClippingEquation
[17:46:26] [Render thread/WARN]: [gbuffers_flw_flywheel_model_2] Unsupported uniform: vec3 uCameraPos
[17:46:26] [Render thread/WARN]: [gbuffers_flw_flywheel_model_2] Unsupported uniform: mat4 uViewProjection
[17:46:26] [Render thread/WARN]: [gbuffers_flw_flywheel_oriented_3] Unsupported uniform: vec3 uCameraPos
[17:46:26] [Render thread/WARN]: [gbuffers_flw_flywheel_oriented_3] Unsupported uniform: mat4 uViewProjection
[17:46:26] [Render thread/INFO]: Creating pipeline for dimension NETHER
[17:46:27] [Render thread/WARN]: [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:27] [Render thread/WARN]: [] Unsupported uniform: vec4 imm_ptl_ClippingEquation
[17:46:27] [Render thread/WARN]: [] Unsupported uniform: vec4 imm_ptl_ClippingEquation
[17:46:27] [Render thread/WARN]: [] Unsupported uniform: vec4 imm_ptl_ClippingEquation
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,
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
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. (
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 IrisShaders/Iris#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: IrisShaders/Iris@f5d3a6d
I am planning to use a different way to copy stencil to get better compatibility with some videocards.
Any update on this? I'm getting the same issue even with the most recent 1.19.2 version (2.3.3.) as well as immersive engineering (9.2.0-162) regardless of whether stencils are off or on
Sorry if this is necro posting at this point
Thank you for figuring this problem out. I am using 1.19.2 and I had the red world problem, where iris would go into compatibility mode and turn the whole world red. I disabled the stencil buffer and now everything seems to work correctly. This is my first time using immersive portals, and I am highly impressed! I am using Oculus and Rubidium, because Immersive Engineering said it was incompatible with Optifine. Little did I know! Thank you again, I know I will use your mod for a long time from now.
I'm playing All the Mods 8, installed Immersive Portal and using ComplementaryShaders v4.7.1 also having the red screen regardless of whether stencils are off or on.
Hey @Nick1st Is this still needed as open or is all fixed and done now? Sorry for the tag