feat(particles): Étape 28 A — ParticlePool infrastructure (no driver)
Creates the GPU resource layer for particles per ARCHI §3.2/§6, without simulation: the pool owns all buffers/pipeline/bind group but draws nothing (indirect args zeroed → no-op) until a driver is attached (Étape B). New: - resources/particle.rs: Particle (80 B, #[repr(C)], no padding — D19), SIZE/ZERO consts + offset/layout unit tests - shaders/particle_billboard.wgsl: camera-facing billboard, empty vertex layout (quad via vertex_index), instance slot via storage binding compact_index (D17), uv_rect atlas support (D15/D18) - core/particles.rs: ParticlePoolConfig, BlendingMode, ParticleDriver trait (D3), ParticlePool (4 buffers + pipeline + bind group), default disc texture (D11), unit tests Wired: - Scene: SceneGpu keeps queue/sample_count; particle_pools registry + create_particle_pool() (default disc when no texture given) - utils::conf PARTICLE_BILLBOARD_SHADER, module re-exports, prelude - tests/wgsl_validate.rs: particle billboard naga validation (2 entry points) Docs: DRAFT call-site/tree synced with the final code; AGENTS.md test count (138) + wgpu 30 API drift gotcha (contents/DeviceExt/ALPHA_BLENDING, DepthStencilState no Default, NonZero min_binding_size, const Zeroable). cargo test -p wsg-lib: 138 pass (121 lib + 10 wgsl + 7), 0 warnings.
This commit is contained in:
+3
-4
@@ -60,9 +60,9 @@ seront repris **après** le système de particules (phase 7).
|
||||
|
||||
```
|
||||
lib/
|
||||
├── shaders/
|
||||
│ └── particle_billboard.wgsl # NOUVEAU : vs_main + fs_main (pas de compute)
|
||||
└── src/
|
||||
├── shaders/
|
||||
│ └── particle_billboard.wgsl # NOUVEAU : vs_main + fs_main (pas de compute)
|
||||
├── utils/
|
||||
│ └── conf.rs # + pub const PARTICLE_BILLBOARD_SHADER (include_str!, pattern existant)
|
||||
├── resources/
|
||||
@@ -373,8 +373,7 @@ impl Scene {
|
||||
// Construire le pool (buffers + pipeline + bind group)
|
||||
let gpu = self.gpu();
|
||||
let pool = ParticlePool::new(
|
||||
&gpu.device,
|
||||
&gpu.queue,
|
||||
gpu.device.as_ref(),
|
||||
gpu.format,
|
||||
gpu.sample_count,
|
||||
&config,
|
||||
|
||||
Reference in New Issue
Block a user