2022-06-21 23:16:14 -05:00
|
|
|
#version 330 core
|
|
|
|
in vec2 TexCoords;
|
2023-05-16 01:31:13 -05:00
|
|
|
in vec4 fColor;
|
2023-05-24 20:45:50 -05:00
|
|
|
in vec2 fst;
|
2023-05-06 21:16:10 -05:00
|
|
|
|
2022-06-21 23:16:14 -05:00
|
|
|
out vec4 color;
|
|
|
|
|
|
|
|
uniform sampler2D text;
|
|
|
|
|
2023-05-22 00:08:08 -05:00
|
|
|
float osize = 1.0;
|
|
|
|
|
2022-06-21 23:16:14 -05:00
|
|
|
void main()
|
2022-12-20 19:34:22 -06:00
|
|
|
{
|
2023-05-16 01:31:13 -05:00
|
|
|
float lettera = texture(text,TexCoords).r;
|
2023-05-22 00:08:08 -05:00
|
|
|
|
2023-05-16 01:31:13 -05:00
|
|
|
if (lettera <= 0.1f)
|
2023-05-24 20:45:50 -05:00
|
|
|
{
|
|
|
|
vec2 uvpos = TexCoords - fst;
|
|
|
|
for (int x = 0; x < 3; x++) {
|
|
|
|
for (int y = 0; y < 3; y++) {
|
|
|
|
float pa = texture(text, uvpos + (fst*vec2(x,y))).r;
|
|
|
|
if (pa > 0.1) {
|
|
|
|
color = vec4(0.0,0.0,0.0, fColor.a);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-05-16 01:31:13 -05:00
|
|
|
discard;
|
2023-05-24 20:45:50 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
// vec2 lsize = fst / textureSize(text,0).xy;
|
|
|
|
/* vec2 uvpos = TexCoords - fst;
|
|
|
|
for (int x = 0; x < 3; x++) {
|
|
|
|
for (int y = 0; 0 < 3; y++) {
|
|
|
|
float pa = texture(text, uvpos + (fst * vec2(x,y))).r;
|
|
|
|
|
|
|
|
if (pa <= 0.1) {
|
|
|
|
color = vec4(0.0,0.0,0.0,fColor.a);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
*/
|
2023-05-16 01:31:13 -05:00
|
|
|
|
2023-05-24 20:45:50 -05:00
|
|
|
color = vec4(fColor.xyz, fColor.a);
|
2023-02-03 22:18:19 -06:00
|
|
|
}
|