summaryrefslogtreecommitdiff
path: root/data/shader.fs
diff options
context:
space:
mode:
Diffstat (limited to 'data/shader.fs')
-rwxr-xr-xdata/shader.fs20
1 files changed, 20 insertions, 0 deletions
diff --git a/data/shader.fs b/data/shader.fs
new file mode 100755
index 0000000..a79c8fd
--- /dev/null
+++ b/data/shader.fs
@@ -0,0 +1,20 @@
+#version 140
+// -*- mode: C -*-
+// Defines emitted by gridrectst::init_gl at load:
+// dimx, dimy: Grid size of the screen array
+// dispx, dispy: Grid-cell (font) size
+// vec4 colors[16]: Color palette; first non-bold, then bold
+
+out vec4 gl_FragColor;
+
+flat in vec4 frontColor;
+flat in vec4 backColor;
+
+smooth in vec2 texCoords;
+uniform sampler2D textures;
+
+void main() {
+ vec4 texColor = texture2D(textures, texCoords);
+
+ gl_FragColor = mix(backColor, frontColor * texColor, texColor.a);
+}