Bliss-Shader/shaders/lib/voxel_read.glsl

13 lines
327 B
Plaintext
Raw Normal View History

2024-05-01 16:32:25 -04:00
uint GetVoxelBlock(const in ivec3 voxelPos) {
// TODO: exit early if outside bounds
2024-05-02 12:43:30 -04:00
2024-05-01 16:32:25 -04:00
return imageLoad(imgVoxelMask, voxelPos).r;
}
2024-05-02 14:18:49 -04:00
// uint GetVoxelBlock(const in vec3 playerPos) {
// ivec3 voxelPos = GetVoxelIndex(playerPos);
2024-05-01 16:32:25 -04:00
2024-05-02 14:18:49 -04:00
// // TODO: exit early if outside bounds
// return imageLoad(imgVoxelMask, voxelPos).r;
// }