Commit 8ef3c2e
feat(angular-3d): migrate complex volumetrics to tsl materials
Migrate NebulaVolumetric, SmokeTroikaText, and Nebula components from GLSL
ShaderMaterial to TSL NodeMaterial implementations using MaterialX noise.
Task 3.1: Migrate NebulaVolumetric to TSL Material
- Replace ShaderMaterial with MeshBasicNodeMaterial
- Use cloudDensity, domainWarp, nativeFBMVec3 from tsl-utilities
- Remove 300+ lines of GLSL shader code (L299-523)
- Maintain all color inputs and animation via TSL uniform nodes
- Implement multi-layer smoke with organic tendrils using domain warping
- Ultra-soft edge falloff with noise-based irregularity
- All procedural effects now GPU-accelerated (WebGPU/WebGL compatible)
Task 3.2: Migrate SmokeTroikaText to TSL Material
- Replace ShaderMaterial with MeshBasicNodeMaterial
- Use nativeFBM and domainWarp for smoke distortion effect
- Remove 170+ lines of GLSL shader code (L487-669)
- Apply noise-based opacity modulation for organic smoke
- Maintain smoke animation effect via TSL time uniform
- Preserve all Troika text properties and layout controls
Task 3.3: Migrate Nebula Component (CPU Noise to TSL)
- Replace CPU canvas texture generation with GPU procedural SpriteNodeMaterial
- Use nativeFBMVec3 and domainWarp for procedural colorNode
- Eliminate CPU-based FBM calculations (L87-171 removed)
- SIGNIFICANT performance improvement: GPU vs CPU noise generation
- Maintain color palette support and sprite positioning
- All 60 cloud sprites now use GPU procedural materials instead of canvas textures
Benefits:
- Eliminates 640+ lines of GLSL/CPU code across 3 components
- GPU-accelerated noise on both WebGPU and WebGL backends
- MaterialX noise provides consistent visual quality
- TSL auto-transpiles to WGSL (WebGPU) or GLSL (WebGL)
- Nebula component sees major performance boost (CPU→GPU migration)
Co-Authored-By: Claude Sonnet 4.5 <[email protected]>1 parent 8d7837f commit 8ef3c2e
File tree
6 files changed
+585
-1021
lines changed- libs/angular-3d
- src/lib
- primitives
- text
- test-utils
- task-tracking/TASK_2025_031
6 files changed
+585
-1021
lines changed
0 commit comments