fix different grid sizes
This commit is contained in:
parent
a39cf62b0b
commit
4a81ae6440
4 changed files with 5 additions and 5 deletions
shaders
Binary file not shown.
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue