Bliss-Shader/shaders/lib/voxel_read.glsl
2024-05-02 12:43:30 -04:00

13 lines
312 B
GLSL

uint GetVoxelBlock(const in ivec3 voxelPos) {
// TODO: exit early if outside bounds
return imageLoad(imgVoxelMask, voxelPos).r;
}
uint GetVoxelBlock(const in vec3 playerPos) {
ivec3 voxelPos = GetVoxelIndex(playerPos);
// TODO: exit early if outside bounds
return imageLoad(imgVoxelMask, voxelPos).r;
}