mojira.dev
MC-297955

Some global uniforms not working

When using vanilla 1.21.5, absolutely nothing renders since every uniform doesn’t exist for some reason. With performance mods and similar, some uniforms don’t work, but the game is able to be played without huge/noticeable issues.

I was trying to port a core shader resource pack from 1.21.4 to 1.21.5, and had numerous issues with trying to do that.

Steps to reproduce:

in a core shader that affects the entire screen (I used position_tex_color on the RP reload screen), I set the red channel to uv.x, and green to uv.y.

uv is a vec2, determined by gl_FragCoord.xy / ScreenSize.xy

void main() {
    vec4 color = texture(Sampler0, texCoord0) * vertexColor;
    if (color.a == 0.0 && LogoTest != 1.0) {
        discard;
    }
    fragColor = color * ColorModulator;

    vec2 uv = gl_FragCoord.xy / ScreenSize.xy;
    if (LogoTest == 1.0) {

        fragColor = vec4(uv.x,uv.y,0.0,vertexColor.a);
    }
}

Expected result:

the image below named “expected.png”

This image was taken on 1.21.4 with the same code as above.

It should have black in the bottom left corner, and yellow in the top right. green and red in the other corners.

I don't believe I did my code fully right, as it becomes yellow at the center instead of the corner…

Actual result:

the image below named “actual.png”

Completely black screen in 1.21.5.

through some “if” statements, I determined that ScreenSize was vec2(0.0)

Attached as well is a screenshot of the output log, showing that a lot of the uniforms in many different core shaders were failing

Environment

Fresh instance of 1.21.5, on Macbook M1 chip
Can be in the world or title screen

Linked issues

Attachments

Comments 1

Thank you for your report!
We are tracking this issue in MC-296043, so this ticket is being resolved and linked as a duplicate.

If you would like to add a vote or provide any additional information to the main ticket, it would be appreciated.

If you haven’t already, please make use of the search feature to see whether an issue has already been reported.

Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki

Steve Locks

(Unassigned)

Unconfirmed

(Unassigned)

1.21.5

Retrieved