V210 issue fix + correct packing
This commit is contained in:
@@ -19,15 +19,16 @@ fn bar_index(px: u32) -> u32 {
|
||||
@compute @workgroup_size(64)
|
||||
fn main(@builtin(global_invocation_id) gid: vec3<u32>) {
|
||||
let block = gid.x;
|
||||
let total = (params.width * params.height) / 6u;
|
||||
let blocks_per_row = (params.width + 5u) / 6u;
|
||||
let total = blocks_per_row * params.height;
|
||||
if (block >= total) {
|
||||
return;
|
||||
}
|
||||
|
||||
let y_tab = array<u32, 13>(64u, 137u, 210u, 283u, 356u, 429u, 502u, 575u, 648u, 721u, 794u, 867u, 940u);
|
||||
|
||||
let x = (block * 6u) % params.width;
|
||||
let py = (block * 6u) / params.width;
|
||||
let x = (block % blocks_per_row) * 6u;
|
||||
let py = block / blocks_per_row;
|
||||
// Moving square: horizontal oscillation around screen center.
|
||||
// frame is a small tick; converting the huge raw grain index here
|
||||
// would destroy f32 precision and freeze the motion.
|
||||
|
||||
Reference in New Issue
Block a user