rework position encoding

This commit is contained in:
2026-10-29 19:59:52 +00:00
parent 7bef1dad7e
commit 1e13f18510
5 changed files with 56 additions and 61 deletions
@@ -296,16 +296,27 @@ pub fn compile_raytracing_blas(
)),
);
let pc = PushConstants {
let mut pc = PushConstants {
aabb_buffer_offset: aabbs_slice.range.start,
metadata_buffer_offset: metadata_slice.range.start,
flags: FLAG_FILL_ENABLE_GEN | FLAG_FILL_SPATIAL_TEXTURE,
flags: FLAG_FILL_ENABLE_GEN,
};
compute_pass.set_pipeline(pipeline);
compute_pass.set_bind_group(0, &bind_group, &[]);
compute_pass.set_immediates(0, bytemuck::bytes_of(&pc));
compute_pass.dispatch_workgroups(4, 4, 4);
compute_pass.dispatch_workgroups(
tape.subdivision / 8,
tape.subdivision / 8,
tape.subdivision / 8,
);
pc.flags = FLAG_FILL_SPATIAL_TEXTURE;
compute_pass.set_immediates(0, bytemuck::bytes_of(&pc));
compute_pass.dispatch_workgroups(
tape.subdivision,
tape.subdivision,
tape.subdivision,
);
updated_blases.push(key.tape);