| Age | Commit message (Collapse) | Author |
|
Define CommonUniforms struct with standard fields:
- resolution: vec2<f32>
- aspect_ratio: f32
- time: f32
- beat: f32
- audio_intensity: f32
Updated 14 shaders to use CommonUniforms:
- Replaced width/height with resolution
- Unified intensity/audio_peak → audio_intensity
- Moved effect-specific params to EffectParams struct
- visual_debug.wgsl now uses GlobalUniforms.view_proj
All shaders now have consistent uniform interface.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
|
Implements Task #73 - Extends shader parametrization system to
ChromaAberrationEffect following the FlashEffect pattern.
Changes:
- Added ChromaAberrationParams struct (offset_scale, angle)
- Added ChromaUniforms with proper WGSL alignment (32 bytes)
- Updated shader to compute offset direction from angle parameter
- Extended seq_compiler to parse offset/angle parameters
- Updated demo.seq with 2 parameterized instances:
* Line 50: offset=0.03 angle=0.785 (45° diagonal, stronger)
* Line 76: offset=0.01 angle=1.57 (90° vertical, subtle)
Technical details:
- Backward-compatible default constructor maintained
- Migrated from raw buffer to UniformBuffer<ChromaUniforms>
- Shader computes direction: vec2(cos(angle), sin(angle))
- Generated code creates ChromaAberrationParams initialization
Testing:
- All 32/32 tests pass
- Demo runs without errors
- Binary size: 5.6M stripped (~200-300 bytes impact)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
|
Extracted all hardcoded WGSL shaders into external assets. Updated AssetManager to handle shader snippets. Refactored Renderer3D, VisualDebug, and Effects to load shaders via the AssetManager, enabling better shader management and composition.
|