fix different grid sizes

This commit is contained in:
zomseffen 2025-04-08 11:18:43 +02:00
parent a39cf62b0b
commit 4a81ae6440
4 changed files with 5 additions and 5 deletions

Binary file not shown.

View file

@ -175,9 +175,9 @@ void main() {
uint compound_start = 0;
// iterate over the compounds and find the work index inside of it
while (index > compounds[compound_start] * compounds[compound_start]) {
compound_start = compounds[compound_start + 2];
index -= compounds[compound_start] * compounds[compound_start];
output_offset += compounds[compound_start] * compounds[compound_start] * compounds[compound_start];
index -= compounds[compound_start] * compounds[compound_start];
compound_start = compounds[compound_start + 2];
}
// grid pos in the task
uint compound_grid_size = compounds[compound_start];
@ -307,7 +307,7 @@ void main() {
}
if (render) {
add_cube(gl_GlobalInvocationID.x * compound_grid_size + z, compound_scale, check_pos, color);
add_cube(output_offset + index * compound_grid_size + z, compound_scale, check_pos, color);
}
}