Skip to main content

UI_FRAG_SRC

Constant UI_FRAG_SRC 

Source
pub const UI_FRAG_SRC: &str = r#"
#version 330 core

in vec2  f_uv;
in vec4  f_color;
in float f_emission;

uniform sampler2D u_atlas;

layout(location = 0) out vec4 o_color;

void main() {
    float alpha = texture(u_atlas, f_uv).r;
    if (alpha < 0.05) discard;
    o_color = vec4(f_color.rgb, alpha * f_color.a);
}
"#;
Expand description

Fragment shader for UI layer — simple textured quad, no post-processing unless emission > 0.