#version 150

#moj_import <minecraft:dynamictransforms.glsl>

uniform sampler2D Sampler0;

in vec4 vertexColor;
in vec2 texCoord0;

out vec4 fragColor;

void main() {
    vec4 color = texture(Sampler0, texCoord0);
    if (color.a == 0.0) {
        discard;
    }

    vec3 combined = ColorModulator.rgb * vertexColor.rgb;
    float gray = dot(combined, vec3(0.299, 0.587, 0.114));

    fragColor = vec4(vec3(gray), ColorModulator.a);
}