README: explain further musl-specific tweaks
[rofl0r-df-libgraphics.git] / data / shader.fs
bloba79c8fdf843c87b74370d859091d23010041de90
1 #version 140
2 // -*- mode: C -*-
3 // Defines emitted by gridrectst::init_gl at load:
4 // dimx, dimy: Grid size of the screen array
5 // dispx, dispy: Grid-cell (font) size
6 // vec4 colors[16]: Color palette; first non-bold, then bold
8 out vec4 gl_FragColor;
10 flat in vec4 frontColor;
11 flat in vec4 backColor;
13 smooth in vec2 texCoords;
14 uniform sampler2D textures;
16 void main() {
17 vec4 texColor = texture2D(textures, texCoords);
19 gl_FragColor = mix(backColor, frontColor * texColor, texColor.a);