2023-09-15 03:37:07 -05:00
|
|
|
@vs vs
|
|
|
|
in vec2 vert;
|
2024-04-23 15:58:08 -05:00
|
|
|
|
2023-09-15 03:37:07 -05:00
|
|
|
in vec2 pos;
|
|
|
|
in vec2 wh;
|
|
|
|
in vec2 uv;
|
|
|
|
in vec2 st;
|
|
|
|
in vec4 vColor;
|
|
|
|
|
|
|
|
out vec2 TexCoords;
|
|
|
|
out vec4 fColor;
|
|
|
|
|
|
|
|
uniform vs_params { mat4 projection; };
|
|
|
|
|
|
|
|
void main()
|
|
|
|
{
|
|
|
|
gl_Position = projection * vec4(pos + (vert * wh), 0.0, 1.0);
|
|
|
|
|
|
|
|
TexCoords = uv + vec2(vert.x*st.x, st.y - vert.y*st.y);
|
|
|
|
|
|
|
|
fColor = vColor;
|
|
|
|
}
|
|
|
|
@end
|
|
|
|
|
|
|
|
@fs fs
|
|
|
|
in vec2 TexCoords;
|
|
|
|
in vec4 fColor;
|
|
|
|
|
|
|
|
out vec4 color;
|
|
|
|
|
|
|
|
uniform texture2D text;
|
|
|
|
uniform sampler smp;
|
|
|
|
|
|
|
|
void main()
|
|
|
|
{
|
|
|
|
float lettera = texture(sampler2D(text,smp),TexCoords).r;
|
2024-03-05 00:11:34 -06:00
|
|
|
if (lettera < 0.1f) discard;
|
|
|
|
color = fColor;
|
2023-09-15 03:37:07 -05:00
|
|
|
}
|
|
|
|
@end
|
|
|
|
|
|
|
|
@program text vs fs
|