summaryrefslogtreecommitdiffhomepage
path: root/shaders/lightmap.frag
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2023-05-17 17:06:16 +0200
committerStanislaw Halik <sthalik@misaki.pl>2023-05-17 17:08:52 +0200
commit8138cc9a269844b6c0a84c193a7a43aec7010592 (patch)
tree1d7c1f1b37c7f714fd0976bfa839e0b18ca2385d /shaders/lightmap.frag
parent08b89c6575947e8fdcba9b6c329c25aa8472e52b (diff)
wip vobj
Diffstat (limited to 'shaders/lightmap.frag')
-rw-r--r--shaders/lightmap.frag18
1 files changed, 18 insertions, 0 deletions
diff --git a/shaders/lightmap.frag b/shaders/lightmap.frag
new file mode 100644
index 00000000..2179160c
--- /dev/null
+++ b/shaders/lightmap.frag
@@ -0,0 +1,18 @@
+precision mediump float;
+
+struct light_u
+{
+ vec4 color_and_intensity;
+ vec2 center;
+ uint mode;
+};
+
+#define TILE_MAX_DIM 16
+#define TILE_SIZE_X 64
+#define TILE_SIZE_Y 64
+
+#define CHUNK_SIZE_X (TILE_SIZE_X * TILE_MAX_DIM)
+#define CHUNK_SIZE_Y (TILE_SIZE_Y * TILE_MAX_DIM)
+
+layout (location = 0) uniform vec4 color_intensity;
+layout (location = 1) uniform vec2 px;