Expand description
GPU-accelerated marching cubes via compute shaders.
Three-pass pipeline:
- Evaluate field at every grid point → 3D texture
- Classify cells, compute vertex counts, prefix sum
- Generate vertices using tri table → SSBO, draw via indirect
Performance target: 32³ grid in under 1ms on modern GPU.
Structs§
- Field
Eval Uniforms - Uniform buffer for the field evaluation pass.
- GpuField
Source - Uniform buffer data for field source uploads. Sent to the GPU each frame as a small uniform/SSBO.
- GpuMC
Stats - Per-frame GPU marching cubes statistics.
- GpuMarching
Cubes - GPU marching cubes pipeline state.
Constants§
- CLASSIFY_
COMPUTE - Pass 2: Classify cells and count vertices.
- FIELD_
EVAL_ COMPUTE - Pass 1: Evaluate field at every grid point.
- VERTEX_
GEN_ COMPUTE - Pass 3: Generate vertices.