1 #version 140 // -*- mode: C++ -*-
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
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
;
22 vec4 color_tex
= texture
(base
, texpos
);
23 gl_FragColor
= mix
(color_bg
, color_tex
* color_fg
, color_tex
.a
);