2024-11-11 19:21:42 -05:00
|
|
|
#ifdef __cplusplus
|
|
|
|
#include <string>
|
|
|
|
const std::string shader_2d_font_frag = R"("
|
2024-11-12 18:26:34 -05:00
|
|
|
#version 300 es
|
|
|
|
precision mediump float;
|
2024-11-11 19:21:42 -05:00
|
|
|
|
2024-11-12 18:26:34 -05:00
|
|
|
layout (location = 0) out vec4 FragColor;
|
|
|
|
in vec2 uv;
|
2024-11-11 19:21:42 -05:00
|
|
|
|
2024-11-12 18:26:34 -05:00
|
|
|
uniform sampler2D tex;
|
|
|
|
uniform vec4 color;
|
2024-11-11 19:21:42 -05:00
|
|
|
|
2024-11-12 18:26:34 -05:00
|
|
|
void main() {
|
|
|
|
FragColor = texture(tex, uv).r * color;
|
|
|
|
if (FragColor.a < 0.2)
|
|
|
|
discard;
|
|
|
|
}
|
2024-11-11 19:21:42 -05:00
|
|
|
|
|
|
|
")";
|
|
|
|
#endif
|