better dir-link visualization
[vrfileman] / sdr / glow_font.p.glsl
diff --git a/sdr/glow_font.p.glsl b/sdr/glow_font.p.glsl
new file mode 100644 (file)
index 0000000..7c55fd1
--- /dev/null
@@ -0,0 +1,19 @@
+uniform sampler2D tex;
+uniform float smoothness;
+uniform float height;
+uniform vec2 pix_sz;
+
+varying vec2 local_pt;
+
+void main()
+{
+       const vec3 color = vec3(0.2, 0.4, 1.0);
+
+       vec2 uv = gl_TexCoord[0].st;
+       float dist = texture2D(tex, uv).a;
+
+       float glyph = smoothstep(0.5 - smoothness, 0.5 + smoothness, dist);
+
+       gl_FragColor.rgb = color * ((dist - 0.5 - smoothness) * 45.0);
+       gl_FragColor.a = glyph;
+}