Oculus

Oculus

48M Downloads

Crash shader rendering

TheHecateII opened this issue ยท 3 comments

commented

What happened?

The shaders are not active since the switch to version 1.4.3

Screenshots

Screenshot_53

Relevant log output

This error appears at each shader change 

[24nov.2022 18:57:16.700] [main/ERROR] [Oculus/]: Failed to create shader rendering pipeline, disabling shaders!
java.lang.RuntimeException: Failed to compile FRAGMENT shader for program centerDepthSmooth.fsh
	at net.coderbot.iris.gl.program.ProgramBuilder.buildShader(ProgramBuilder.java:99) ~[?:?]
	at net.coderbot.iris.gl.program.ProgramBuilder.begin(ProgramBuilder.java:50) ~[?:?]
	at net.coderbot.iris.postprocess.CenterDepthSampler.<init>(CenterDepthSampler.java:63) ~[?:?]
	at net.coderbot.iris.pipeline.DeferredWorldRenderingPipeline.<init>(DeferredWorldRenderingPipeline.java:222) ~[?:?]
	at net.coderbot.iris.Iris.createPipeline(Iris.java:651) [?:?]
	at net.coderbot.iris.Iris$$Lambda$2975/581225034.apply(Unknown Source) [?:?]
	at net.coderbot.iris.pipeline.PipelineManager.preparePipeline(PipelineManager.java:34) [?:?]
	at net.coderbot.iris.Iris.reload(Iris.java:594) [?:?]
	at net.coderbot.iris.apiimpl.IrisApiV0ConfigImpl.setShadersEnabledAndApply(IrisApiV0ConfigImpl.java:28) [?:?]
	at net.coderbot.iris.gui.screen.ShaderPackScreen.applyChanges(ShaderPackScreen.java:522) [?:?]
	at net.coderbot.iris.gui.screen.ShaderPackScreen.lambda$init$1(ShaderPackScreen.java:207) [?:?]
	at net.coderbot.iris.gui.screen.ShaderPackScreen$$Lambda$7417/117667526.onPress(Unknown Source) [?:?]
	at net.minecraft.client.gui.widget.button.Button.func_230930_b_(SourceFile:33) [?:?]
	at net.minecraft.client.gui.widget.button.AbstractButton.func_230982_a_(SourceFile:16) [?:?]
	at net.minecraft.client.gui.widget.Widget.func_231044_a_(Widget.java:136) [?:?]
	at net.minecraft.client.gui.INestedGuiEventHandler.func_231044_a_(SourceFile:27) [?:?]
	at net.minecraft.client.MouseHelper.func_198033_b(MouseHelper.java:87) [?:?]
	at net.minecraft.client.MouseHelper$$Lambda$6257/2064777114.run(Unknown Source) [?:?]
	at net.minecraft.client.gui.screen.Screen.func_231153_a_(Screen.java:427) [?:?]
	at net.minecraft.client.MouseHelper.func_198023_a(MouseHelper.java:85) [?:?]
	at net.minecraft.client.MouseHelper.func_228030_c_(MouseHelper.java:181) [?:?]
	at net.minecraft.client.MouseHelper$$Lambda$6255/1055053126.run(Unknown Source) [?:?]
	at net.minecraft.util.concurrent.ThreadTaskExecutor.execute(SourceFile:94) [?:?]
	at net.minecraft.client.MouseHelper.func_228028_b_(MouseHelper.java:180) [?:?]
	at net.minecraft.client.MouseHelper$$Lambda$4731/959016175.invoke(Unknown Source) [?:?]
	at org.lwjgl.glfw.GLFWMouseButtonCallbackI.callback(GLFWMouseButtonCallbackI.java:36) [lwjgl-glfw-3.2.2.jar:build 10]
	at org.lwjgl.system.JNI.invokeV(Native Method) ~[lwjgl-3.2.2.jar:build 10]
	at org.lwjgl.glfw.GLFW.glfwPollEvents(GLFW.java:3101) [lwjgl-glfw-3.2.2.jar:build 10]
	at com.mojang.blaze3d.systems.RenderSystem.flipFrame(SourceFile:109) [?:?]
	at net.minecraft.client.MainWindow.func_227802_e_(MainWindow.java:306) [?:?]
	at net.minecraft.client.Minecraft.func_195542_b(Minecraft.java:997) [?:?]
	at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:607) [?:?]
	at net.minecraft.client.main.Main.main(Main.java:184) [?:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_51]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_51]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_51]
	at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_51]
	at net.minecraftforge.fml.loading.FMLClientLaunchProvider.lambda$launchService$0(FMLClientLaunchProvider.java:37) [forge-1.16.5-36.2.39.jar:36.2]
	at net.minecraftforge.fml.loading.FMLClientLaunchProvider$$Lambda$474/161938368.call(Unknown Source) [forge-1.16.5-36.2.39.jar:36.2]
	at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-8.1.3.jar:?]
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-8.1.3.jar:?]
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-8.1.3.jar:?]
	at cpw.mods.modlauncher.Launcher.run(Launcher.java:82) [modlauncher-8.1.3.jar:?]
	at cpw.mods.modlauncher.Launcher.main(Launcher.java:66) [modlauncher-8.1.3.jar:?]
Caused by: java.lang.RuntimeException: Shader compilation failed, see log for details
	at net.coderbot.iris.gl.shader.GlShader.createShader(GlShader.java:46) ~[?:?]
	at net.coderbot.iris.gl.shader.GlShader.<init>(GlShader.java:25) ~[?:?]
	at net.coderbot.iris.gl.program.ProgramBuilder.buildShader(ProgramBuilder.java:97) ~[?:?]
	... 43 more

Minecraft Version

1.16.5

Oculus Version

1.4.3

Rubidium Version

rubidium-0.2.10

Operating System

Windows 11

What is your GPU?

RX 6700XT

Java Version

Java 8

Additional context

No response

commented

The culprit seems to be here:

gl_FragColor = vec4(mix(, currentDepth, decay2), 0, 0, 0);

Replacing it with the one from the prior commit (https://github.com/Asek3/Oculus/blob/a407df92ad52f4a2485a2d03c781335fe086c026/src/main/resources/centerDepth.fsh) or the one from the 1.18.2 branch (https://github.com/Asek3/Oculus/blob/1.18.2/src/main/resources/centerDepth.fsh) fixes the issue. I do not know if a better fix is needed to make the file correctly have its arguments replaced at runtime, but the 1.18.2 version seems simplified and works without issue on my newish hardware. Can't speak for older hardware, but this is a simple touch up either way it would seem.

commented

UPDATE: I should not have said it works without issue, it simply provides new issues it seems :D

There is much and more log spam when using some shaders, absolutely killing performance. I'm also not sure if things are rendering accurately, but something resembling shaders is rendering. Some shaders are usable with the older 1.16.5 .fsh file without spam, at least, but some absolutely have problems with both new and old .fsh files. This will probably take a more specific fix in: https://github.com/Asek3/Oculus/blob/1.16.5/src/main/java/net/coderbot/iris/postprocess/CenterDepthSampler.java to really address.

A sample of some of the log spam from Sildur's+Enhanced+Default+v1.141+Fast.zip on Linux w/ mesa 22.2.3-1 and amdgpu with an AMD RX 6900XT

        ID: 0x2
	Source: API
	Type: ERROR
	Severity: HIGH
	Message: GL_INVALID_OPERATION in glUniform(program not linked)
	ID: 0x2
	Source: API
	Type: ERROR
	Severity: HIGH
	Message: GL_INVALID_OPERATION in glUniform(program not linked)
Stacktrace: org.lwjgl.opengl.GL11C.nglGetBooleanv(Native Method)
              org.lwjgl.opengl.GL11C.glGetBoolean(GL11C.java:758)
              me.jellysquid.mods.sodium.client.gl.compat.LegacyFogHelper.getFogMode(LegacyFogHelper.java:37)
              me.jellysquid.mods.sodium.client.render.chunk.shader.ChunkRenderShaderBackend.begin(ChunkRenderShaderBackend.java:65)
              me.jellysquid.mods.sodium.client.render.chunk.shader.ChunkRenderShaderBackend.iris$begin(ChunkRenderShaderBackend.java:576)
              me.jellysquid.mods.sodium.client.render.chunk.ChunkRenderManager.redirect$zld000$iris$backendBeginExt(ChunkRenderManager.java:1108)
              me.jellysquid.mods.sodium.client.render.chunk.ChunkRenderManager.renderLayer(ChunkRenderManager.java:405)
              me.jellysquid.mods.sodium.client.render.SodiumWorldRenderer.drawChunkLayer(SodiumWorldRenderer.java:229)
              net.minecraft.client.renderer.WorldRenderer.func_228441_a_(WorldRenderer.java:6248)
              net.minecraft.client.renderer.WorldRenderer.func_228426_a_(WorldRenderer.java:1147)
              net.minecraft.client.renderer.GameRenderer.func_228378_a_(GameRenderer.java:608)
              net.minecraft.client.renderer.GameRenderer.func_195458_a(GameRenderer.java:425)
              net.minecraft.client.Minecraft.func_195542_b(Minecraft.java:977)
              net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:607)
              net.minecraft.client.main.Main.main(Main.java:184)
              java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
              java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              java.base/java.lang.reflect.Method.invoke(Method.java:566)
              net.minecraftforge.fml.loading.FMLClientLaunchProvider.lambda$launchService$0(FMLClientLaunchProvider.java:37)
              cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37)
              cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54)
              cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72)
              cpw.mods.modlauncher.Launcher.run(Launcher.java:82)
              cpw.mods.modlauncher.Launcher.main(Launcher.java:66)
              java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
              java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              java.base/java.lang.reflect.Method.invoke(Method.java:566)
              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:62)
              java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              java.base/java.lang.reflect.Method.invoke(Method.java:566)
              org.prismlauncher.impl.OneSixLauncher.invokeMain(OneSixLauncher.java:104)
              org.prismlauncher.impl.OneSixLauncher.launchWithMainClass(OneSixLauncher.java:176)
              org.prismlauncher.impl.OneSixLauncher.launch(OneSixLauncher.java:186)
              org.prismlauncher.EntryPoint.listen(EntryPoint.java:144)
              org.prismlauncher.EntryPoint.main(EntryPoint.java:74)
commented

Fixed in Dev