getting closer to dumb font rendering

This commit is contained in:
Mitchell Hashimoto
2022-04-03 22:04:42 -07:00
parent 5d1d153955
commit 670af17a1b
10 changed files with 166 additions and 10 deletions

9
shaders/text.f.glsl Normal file
View File

@@ -0,0 +1,9 @@
#version 120
varying vec2 texcoord;
uniform sampler2D tex;
uniform vec4 color;
void main(void) {
gl_FragColor = vec4(1, 1, 1, texture2D(tex, texcoord).r) * color;
}

9
shaders/text.v.glsl Normal file
View File

@@ -0,0 +1,9 @@
#version 120
attribute vec4 coord;
varying vec2 texcoord;
void main(void) {
gl_Position = vec4(coord.xy, 0, 1);
texcoord = coord.zw;
}