summaryrefslogtreecommitdiff
path: root/crates/renderer/src/assets/shaders/background/frag.glsl
blob: 73a166d58d56f16dc99bd2b5c3ecc05c5b301273 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
uniform sampler2D texture_data;
uniform sampler2D background;

void main()
{
    vec2 tcfull = vec2(vertex_texcoord.x, 1.0 - vertex_texcoord.y);
    vec4 texel = texture(texture_data, tcfull);
    if (texel.r == 0.0) {
        discard;
    }
    // frag_color = vec4(1.0, 1.0, 1.0, 1.0);
    frag_color = vec4(texture(background, tcfull).xyz, 1.0);
}