- source
- -
- particle
- -
- scene
- -
- conversion
- -
- distance
- -
- contrast
- -
The soft path compares particle and opaque scene depth in view space before applying the contrast curve.
The official soft-particles example fades smoke sprites where they intersect solid geometry. This study keeps viewport depth, view-space conversion, contrast shaping, sprite lifecycle, and the WebGL2 capability boundary visible without relying on external assets.
Building a local occluder, ground, and procedural smoke texture.
The soft path compares particle and opaque scene depth in view space before applying the contrast curve.
A deterministic texture and range-based lifetime keep the particle source local while the sprite material owns the fade.
WebGPU reads the viewport depth graph; WebGL2 keeps the generated smoke and solid scene but uses a direct hard-sprite reference.
Generated smoke alpha is sampled and rotated through the sprite UV domain.
Per-instance lifetime drives position, scale, and fade without JavaScript particle objects.
The opaque scene depth is read at the particle fragment.
Normalized depth separation becomes a controllable symmetric fade.
The direct path preserves the sprite scene while labeling the missing viewport-depth node.
Tune the intersection fade, then measure thirty frames of the active path.
This is a deterministic adaptation of the official soft-particles example: local smoke and occluder assets replace external files while viewport depth, view-space conversion, contrast shaping, sprite lifecycle, and the hard fallback boundary remain executable.
Sources: official soft particles example · TSL · ViewportDepthTextureNode · SpriteNodeMaterial