example: add font_sdf.zig

This commit is contained in:
Timothy Fiss 2025-07-26 17:33:36 -06:00 committed by Nikolas
parent 180d2e04de
commit d39c75c234
5 changed files with 208 additions and 0 deletions

View file

@ -0,0 +1,20 @@
#version 100
precision mediump float;
// Input vertex attributes (from vertex shader)
varying vec2 fragTexCoord;
varying vec4 fragColor;
// Input uniform values
uniform sampler2D texture0;
uniform vec4 colDiffuse;
void main()
{
vec4 texelColor = texture2D(texture0, fragTexCoord);
if (texelColor.a == 0.0) discard;
gl_FragColor = texelColor*fragColor*colDiffuse;
}