layout (local_size_x = 32, local_size_y = 32) in;

uniform vec2 viewSize;        // for Voxelization.glsl
uniform vec3 cameraPosition;  // for Voxelization.glsl
uniform float far;            // for Voxelization.glsl
#include "../../includes/Voxelization.glsl"
layout (r32ui) uniform uimage2D voxel_data_img;
//layout (r32ui) uniform uimage2D voxel_data_img2;

#if (VOXEL_BUFFER_HEIGHT == 512)
const ivec3 workGroups = ivec3(512, 16, 1);
#elif (VOXEL_BUFFER_HEIGHT == 1024)
const ivec3 workGroups = ivec3(512, 32, 1);
#elif VOXEL_BUFFER_HEIGHT == 2048
// default: size of colortex0 = 16384,2048    32*512=16384 32*64=2048
const ivec3 workGroups = ivec3(512, 64, 1);
#elif (VOXEL_BUFFER_HEIGHT == 4096)
const ivec3 workGroups = ivec3(512, 128, 1);
#elif (VOXEL_BUFFER_HEIGHT == 6144)
const ivec3 workGroups = ivec3(512, 192, 1);
#elif (VOXEL_BUFFER_HEIGHT == 8192)
const ivec3 workGroups = ivec3(512, 256, 1);
#elif (VOXEL_BUFFER_HEIGHT == 12288)
const ivec3 workGroups = ivec3(512, 384, 1);
#else
const ivec3 workGroups = ivec3(512, 512, 1);
#endif

void main() {
    ivec2 coord = ivec2(gl_GlobalInvocationID.xy);
    
    imageStore(voxel_data_img, coord, uvec4(0));
}
