summaryrefslogtreecommitdiff
path: root/src/gpu/effects/shader_composer.h
AgeCommit message (Collapse)Author
8 hoursrefactor(gpu): Implement compile-time BVH toggle via shader compositionskal
Completed Task #18-B optimization and refactoring. - Replaced runtime branching in shader with compile-time snippet substitution in ShaderComposer. - Added 'scene_query_bvh.wgsl' and 'scene_query_linear.wgsl' as distinct snippets. - Refactored Renderer3D to manage two separate pipelines (with and without BVH). - Updated ShaderComposer to support snippet substitution during composition. - Verified both paths with test_3d_render (default and --no-bvh). - Removed temporary shader hacks and cleaned up renderer_3d.wgsl.
46 hoursfeat(gpu): Implement recursive WGSL composition and modularize shaders (Task ↵skal
#50) - Updated ShaderComposer to support recursive #include "snippet_name" with cycle detection. - Extracted granular WGSL snippets: math/sdf_shapes, math/sdf_utils, render/shadows, render/scene_query, render/lighting_utils. - Refactored Renderer3D to use #include in shaders, simplifying C++ dependency lists. - Fixed WGPUShaderSourceWGSL usage on macOS to correctly handle composed shader strings. - Added comprehensive unit tests for recursive composition in test_shader_composer. - Verified system stability with test_3d_render and full test suite. - Marked Task #50 as recurrent for future code hygiene.
3 daysfeat: Complete audio tracker system integration and testsskal
4 daysfeat(3d): Implement Task 21.1 WGSL Library & Composerskal
- Implemented ShaderComposer for modular WGSL snippet management. - Factored out common math, primitives, lighting, and ray-box helpers. - Refactored Renderer3D to use dynamic shader composition. - Consolidated high-DPI and shadow robustness fixes into final shader structure.