Bliss Shaders

Bliss Shaders

3M Downloads

Bug Report: Shader crashes in non-overworld dimensions when SKY_GROUND is def

squidforthewid opened this issue ยท 1 comments

commented

Describe the bug

The variable atmosphereGround in composite1.fsh is defined in an #ifdef OVERWORLD_SHADER directive, but is then called outside of the directive in an #ifdef SKY_GROUND, meaning the shader crashes whenever you enter another dimension if both RESOURCEPACK_SKY and SKY_GROUND are enabled, since the variable is never defined.

#ifdef OVERWORLD_SHADER

    float atmosphereGround = 1.0 - exp2(-50.0 * pow(clamp(feetPlayerPos_normalized.y+0.025,0.0,1.0),2.0)  ); // darken the ground in the sky.

    //...
#endif

#if RESOURCEPACK_SKY == 1 || RESOURCEPACK_SKY == 2 || RESOURCEPACK_SKY == 3
    vec3 resourcePackskyBox = toLinear(texture2D(colortex10, texcoord).rgb * 5.0) * 15.0 * clamp(unsigned_WsunVec.y*2.0,0.1,1.0);

    #ifdef SKYGROUND
        resourcePackskyBox *= atmosphereGround; //BUG
    #endif

    Background += resourcePackskybox;
#endif

Describe how your minecraft is set up

Bliss Shader Main, commit #482
Rest of the setup shouldn't matter, will always occur

Describe how to reproduce the bug

Resource pack sky on, atmosphere ground on

Failed to create shader rendering pipeline, disabling shaders!
net.irisshaders.iris.gl.shader.ShaderCompileException: composite2.fsh: composite2.fsh: 0(1047) : error C1503: undefined variable "atmosphereGround"

at knot//net.irisshaders.iris.gl.shader.GlShader.createShader(GlShader.java:46)
at knot//net.irisshaders.iris.gl.shader.GlShader.<init>(GlShader.java:25)
at knot//net.irisshaders.iris.gl.program.ProgramBuilder.buildShader(ProgramBuilder.java:88)
at knot//net.irisshaders.iris.gl.program.ProgramBuilder.begin(ProgramBuilder.java:49)
at knot//net.irisshaders.iris.pipeline.CompositeRenderer.createProgram(CompositeRenderer.java:324)
at knot//net.irisshaders.iris.pipeline.CompositeRenderer.<init>(CompositeRenderer.java:121)
at knot//net.irisshaders.iris.pipeline.IrisRenderingPipeline.<init>(IrisRenderingPipeline.java:328)
at knot//net.irisshaders.iris.Iris.createPipeline(Iris.java:618)
at knot//net.irisshaders.iris.pipeline.PipelineManager.preparePipeline(PipelineManager.java:33)
at knot//net.irisshaders.iris.Iris.reload(Iris.java:569)
at knot//net.irisshaders.iris.apiimpl.IrisApiV0ConfigImpl.setShadersEnabledAndApply(IrisApiV0ConfigImpl.java:28)
at knot//net.irisshaders.iris.gui.screen.ShaderPackScreen.applyChanges(ShaderPackScreen.java:619)
at knot//net.irisshaders.iris.gui.screen.ShaderPackScreen.lambda$init$6(ShaderPackScreen.java:260)
at knot//net.minecraft.class_4185.method_25306(class_4185.java:96)
at knot//net.minecraft.class_4264.method_25348(class_4264.java:48)
at knot//net.minecraft.class_339.method_25402(class_339.java:141)
at knot//net.minecraft.class_4069.method_25402(class_4069.java:38)
at knot//net.irisshaders.iris.gui.screen.ShaderPackScreen.method_25402(ShaderPackScreen.java:221)
at knot//net.minecraft.class_312.method_1611(class_312.java:107)
at knot//net.minecraft.class_437.method_25412(class_437.java:431)
at knot//net.minecraft.class_312.method_1601(class_312.java:107)
at knot//net.minecraft.class_312.method_22686(class_312.java:196)
at knot//net.minecraft.class_1255.execute(class_1255.java:108)
at knot//net.minecraft.class_312.method_22684(class_312.java:196)
at knot//org.lwjgl.glfw.GLFWMouseButtonCallbackI.callback(GLFWMouseButtonCallbackI.java:43)
at knot//org.lwjgl.system.JNI.invokeV(Native Method)
at knot//org.lwjgl.glfw.GLFW.glfwPollEvents(GLFW.java:3438)
at knot//com.mojang.blaze3d.systems.RenderSystem.pollEvents(RenderSystem.java:150)
at knot//com.mojang.blaze3d.systems.RenderSystem.flipFrame(RenderSystem.java:168)
at knot//net.minecraft.class_1041.method_15998(class_1041.java:303)
at knot//net.minecraft.class_310.method_1523(class_310.java:1307)
at knot//net.minecraft.class_310.method_1514(class_310.java:882)
at knot//net.minecraft.client.main.Main.main(Main.java:256)
at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:480)
at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74)
at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)

EDIT: nvm someone already reported it lol

commented

yep im aware of this one, just a small overlook on my end