Text rendering via script

This commit is contained in:
2022-12-21 01:34:22 +00:00
parent df907aec2b
commit 2bcee44677
9 changed files with 109 additions and 44 deletions

View File

@@ -6,7 +6,10 @@ uniform sampler2D text;
uniform vec3 textColor;
void main()
{
{
vec4 sampled = vec4(1.0, 1.0, 1.0, texture(text, TexCoords).r);
color = vec4(textColor, 1.0) * sampled;
if (color.a <= 0.1f)
discard;
}