GPU-Accelerated Cloth Tearing and Dynamic Mesh Fracture in WebGPU
Simulating structural strain limits, dynamic edge removal, and runtime index buffer modification using parallel WGSL compute passes.
Simulating interactive material tearing requires breaking mesh connectivity dynamically when mechanical stress thresholds are exceeded. Executing mass-spring strain evaluation inside WebGPU compute workgroups allows tearing high-resolution garments at interactive frame rates.
1. Structural Strain Limit Evaluation in WGSL
Compute shaders measure spring stretch ratios across adjacent mesh vertices every frame. When local strain exceeds material yield strength limits, the algorithm flags spring constraints for immediate rupture.
2. Dynamic Vertex Splitting & Topology Modification
Edge rupture requires duplicating shared vertices to create distinct mesh boundaries. Executing atomic vertex allocation routines inside GPU storage buffers modifies index buffers dynamically without round-trip data transfers to JavaScript.
3. Self-Collision Handling for Torn Garment Strips
Evaluating spatial hash grids inside WebGPU compute passes prevents torn fabric strips from intersecting with themselves or surrounding rigid CAD colliders.