summaryrefslogtreecommitdiff
path: root/src/gpu/effects/shaders.cc
AgeCommit message (Collapse)Author
29 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.
46 hoursrefactor: Task #20 - Platform & Code Hygieneskal
- Consolidated all WebGPU shims and platform-specific logic into src/platform.h. - Refactored platform_init to return PlatformState by value and platform_poll to automatically refresh time and aspect_ratio. - Removed STL dependencies (std::map, std::vector, std::string) from AssetManager and Procedural subsystems. - Fixed Windows cross-compilation by adjusting include paths and linker flags in CMakeLists.txt and updating build_win.sh. - Removed redundant direct inclusions of GLFW/glfw3.h and WebGPU headers across the project. - Applied clang-format and updated documentation. handoff(Gemini): Completed Task #20 and 20.1. Platform abstraction is now unified, and core paths are STL-free. Windows build is stable.
2 daystest(shader): Add ShaderComposer and WGSL asset validation tests (Task #26)skal
Implemented comprehensive unit tests for ShaderComposer and a validation test for production WGSL shader assets. This ensures the shader asset pipeline is robust and that all shaders contain required entry points and snippets. Also improved InitShaderComposer to be more robust during testing.
2 daysrefactor: Shader Asset Integration (Task #24)skal
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.
3 daysfeat: Complete audio tracker system integration and testsskal
3 daysupdate TODO and fix shaders.ccskal
3 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.
3 daysfix(gpu): Resolve high-DPI squished rendering and 3D shadow bugsskal
- Implemented dynamic resolution support in all shaders and effects. - Added explicit viewport setting for all render passes to ensure correct scaling. - Fixed 3D shadow mapping by adding PLANE support and standardizing soft shadow logic. - Propagated resize events through the Effect hierarchy. - Applied project-wide code formatting.
5 daysRefactor: Split demo effects and shaders into individual filesskal
Split src/gpu/demo_effects.cc into individual .cc files for each effect and created separate files for post-processing helpers and WGSL shaders. Updated src/gpu/demo_effects.h to be a central header for all effect-related declarations and adjusted CMakeLists.txt accordingly.