Sodium Reloaded (Unofficial)

Sodium Reloaded (Unofficial)

0 Downloads

Core shader rendertype_solid.fsh disabled in resource pack

ImPlotzes opened this issue ยท 1 comments

commented

Bug Description

The core shader assets/minecraft/shaders/core/rendertype_solid.fsh in a resource pack isn't applied.

If I have a resource pack with that shader being:

#version 150

#moj_import <fog.glsl>

uniform sampler2D Sampler0;

uniform vec4 ColorModulator;
uniform float FogStart;
uniform float FogEnd;
uniform vec4 FogColor;

in float vertexDistance;
in vec4 vertexColor;
in vec2 texCoord0;
in vec4 normal;

out vec4 fragColor;

void main() {
    // Every block has pure white texture
    vec4 textureColor = vec4(1.0, 1.0, 1.0, 1.0);

    vec4 color = textureColor * vertexColor * ColorModulator;
    fragColor = linear_fog(color, vertexDistance, FogStart, FogEnd, FogColor);
}

then I expect every solid block (those are affected by this shader) to be pure white because the texture is being overwritten. This works when using Fabric without Sodium in 1.20.1.
When Sodium (v0.5.3) is used, all solid blocks will have their normal texture, this shader isn't being run anymore.

Reproduction Steps

Create a resource pack with the file assets/minecraft/shaders/core/rendertype_solid.fsh which should contain the following code:

#version 150

#moj_import <fog.glsl>

uniform sampler2D Sampler0;

uniform vec4 ColorModulator;
uniform float FogStart;
uniform float FogEnd;
uniform vec4 FogColor;

in float vertexDistance;
in vec4 vertexColor;
in vec2 texCoord0;
in vec4 normal;

out vec4 fragColor;

void main() {
    // Every block has pure white texture
    vec4 textureColor = vec4(1.0, 1.0, 1.0, 1.0);

    vec4 color = textureColor * vertexColor * ColorModulator;
    fragColor = linear_fog(color, vertexDistance, FogStart, FogEnd, FogColor);
}

Open Minecraft without Sodium and observe many white blocks when using the resource pack.

Restart Minecraft but now with Sodium, and observe that those previously affected blocks are now normal again, the shader doesn't work anymore.

Log File

latest.log

Crash Report

crash-2024-01-09_19.00.49-client.txt

commented

Duplicate of #1569