M12.7: GPU particles (CC Particle World, CC Particle Systems II, Particle Playground cannon): compute-shader simulation with GPU checkpoints, CPU as the oracle

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Brandon Thomas
2026-10-03 02:44:36 -04:00
co-authored by Claude Opus 5.5
parent 9a6389db86
commit 0e3b354520
10 changed files with 925 additions and 13 deletions
+5
View File
@@ -102,6 +102,9 @@ pub struct GpuContext {
uploads: Mutex<Uploads>,
/// Advanced 3D render pipelines (built on first use).
pub(crate) adv3d: std::sync::OnceLock<crate::adv3d::Pipes>,
/// GPU particle pipeline (built on first use) and simulation checkpoints.
pub(crate) particles: crate::particles::PipesCell,
pub(crate) particle_states: crate::particles::StatesCell,
}
fn tex_entry(binding: u32) -> wgpu::BindGroupLayoutEntry {
@@ -263,6 +266,8 @@ impl GpuContext {
dummy_buf,
uploads: Mutex::new(Uploads::default()),
adv3d: std::sync::OnceLock::new(),
particles: Default::default(),
particle_states: Default::default(),
})
}