This commit is contained in:
Gaël committed 2026-10-19 20:59:15 +02:00
commit 87bff164f1
416 files changed
+279512

No files matched your search

+18
View File
@@ -0,0 +1,18 @@
#version 450
#extension GL_GOOGLE_include_directive : require
layout(local_size_x = 64) in;
#include "common.glsl"
// The sky is visible in a window column above its first solid cell (static or powder); this finds that cell for every column (the sky buffer: words 64 ...).
layout(std430, set = 0, binding = 44) buffer Sky { uint sky[]; };
void main() {
int x = int(gl_GlobalInvocationID.x);
if (x >= pc.gw) return;
int top = pc.gh;
for (int y = 0; y < pc.gh; ++y) {
uint m = cell_mat(cells[y * pc.gw + x]);
if (m != 0u && (mflags(m) & (F_STATIC | F_SAND)) != 0u) { top = y; break; }
}
sky[64 + x] = uint(top);
}