fix indexing of cubes

This commit is contained in:
zomseffen 2025-04-07 11:28:20 +02:00
parent 680039cdfa
commit 3f199ce4a6
4 changed files with 10 additions and 9 deletions

View file

@ -26,7 +26,7 @@ layout(binding = 6) buffer Indices {
uint indices[];
};
layout (local_size_x = 256, local_size_y = 1, local_size_z = 1) in;
layout (local_size_x = 16, local_size_y = 1, local_size_z = 1) in;
uvec4 unpack_color(uint val) {
// left most 8 bits first
@ -241,14 +241,9 @@ void main() {
}
if (render) {
add_cube(index * compound_grid_size + z, compound_scale, check_pos, color);
add_cube(gl_GlobalInvocationID.x * compound_grid_size + z, compound_scale, check_pos, color);
}
}
//add_cube(0, compound_scale, compound_pos + mid_offset, vec3(1.0, 0.0, 0.0));
//add_cube(1, compound_scale, compound_pos + vec3(float(compound_grid_size) * compound_scale, float(compound_grid_size) * compound_scale, float(compound_grid_size) * compound_scale) + mid_offset, vec3(1.0, 0.0, 0.0));
volumes[index] = compounds[index];
//volumes[index] = compounds[index];
}