summaryrefslogtreecommitdiff
path: root/src/util/check_return.h
AgeCommit message (Collapse)Author
16 hoursfeat(gpu): Add parameter-driven ChromaAberrationEffectskal
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>
18 hoursfeat(util): Add CHECK_RETURN macros for recoverable errorsskal
Created check_return.h with hybrid macro system: - CHECK_RETURN_IF: Simple validation with immediate return - CHECK_RETURN_BEGIN/END: Complex validation with cleanup - WARN_IF: Non-fatal warnings - ERROR_MSG: Error message helper Applied to 5 call sites: - asset_manager.cc: 3 procedural generation errors - test_demo.cc: 2 command-line validation errors Unlike FATAL_XXX (which abort), these return to caller for graceful error handling. Messages stripped in STRIP_ALL, control flow preserved. Size impact: ~500 bytes saved in STRIP_ALL builds Tests: 31/31 passing Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>