BLT-With-Graphics-Template/include/blt/gfx/renderer/shaders/2d_font.frag

25 lines
490 B
GLSL

#ifdef __cplusplus
#include <string>
const std::string shader_2d_font_frag = R"("
#version 300 es
precision mediump float;
layout (location = 0) out vec4 FragColor;
in vec2 uv;
uniform sampler2D tex;
uniform vec4 color;
void main() {
if (texture(tex, uv).r > 0.2)
FragColor = color;
else
discard;
// if (FragColor.a < 0.2)
// discard;
// else
// FragColor.a = 1.0;
}
")";
#endif