Bliss-Shader/shaders/lib/voxel_read.glsl
2024-05-02 14:36:06 -04:00

7 lines
183 B
GLSL

uint GetVoxelBlock(const in ivec3 voxelPos) {
if (clamp(voxelPos, ivec3(0), ivec3(VoxelSize3-1u)) != voxelPos)
return BLOCK_EMPTY;
return imageLoad(imgVoxelMask, voxelPos).r;
}