fix missing dlfcn.h include
[rofl0r-df-libgraphics.git] / data / art / shader.fs
blob5f39116aa5eb51a2642e2b6294eeabb6bbaccf8d
1 #version 140 // -*- mode: C++ -*-
3 // Inserted by DF:
4 // GRID_X: Number of tiles (horizontally)
5 // GRID_Y: Number of tiles (vertically)
6 // DISP_X: Horizontal tile size, in pixels
7 // DISP_Y: Vertical tile size, in pixels
8 // DISP_X_SCR: // Horizontal tile size, in normalized device coordinates (0-1)
9 // DISP_Y_SCR: // Vertical tile size, same
10 // vec4[16] colors: colors.txt
11 #line 11
13 uniform float time; // Seconds since DF was started
15 in vec4 color_fg, color_bg;
16 smooth in vec3 texpos;
18 // Texture array according to the tileset
19 uniform sampler2DArray base;
21 void main() {
22 vec4 color_tex = texture(base, texpos);
23 gl_FragColor = mix(color_bg, color_tex * color_fg, color_tex.a);