summaryrefslogtreecommitdiff
path: root/assets/final/shaders
AgeCommit message (Collapse)Author
34 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.
36 hourshandoff(Claude): Stabilize 3D renderer with rotating skybox and two-pass ↵skal
architecture - Fixed black screen by ensuring clear operations in Pass 2 when Skybox pass is skipped. - Resolved WebGPU validation errors by synchronizing depth-stencil state. - Implemented rotating skybox using world-space ray unprojection (inv_view_proj). - Improved procedural noise generation (multi-octave Value Noise). - Restored scene integrity by correcting object indexing and removing artifacts. - Updated documentation (TODO.md, PROJECT_CONTEXT.md).
2 daysfix: Implement proper skybox rendering with Perlin noiseskal
- Added ObjectType::SKYBOX for dedicated skybox rendering. - Created assets/final/shaders/skybox.wgsl for background rendering. - Implemented a two-pass rendering strategy in Renderer3D::render: - First pass renders the skybox without depth writes. - Second pass renders scene objects with depth testing. - Corrected GlobalUniforms struct in common_uniforms.wgsl and src/3d/renderer.h to include and explicit padding for 112-byte alignment. - Updated Renderer3D::update_uniforms to set the new and zero-initialize padding. - Reverted sky sampling logic in renderer_3d.wgsl to for SDF misses, preventing background bleed-through. - Updated test_3d_render.cc to include a SKYBOX object with Perlin noise. handoff(Gemini): The skybox is now correctly rendered with Perlin noise as a dedicated background pass. Objects render correctly without transparency to the sky. All necessary C++ and WGSL shader changes are implemented and verified.
2 daysfeat: side-quest - Perlin noise sky and ProcGenFunc error handlingskal
- Updated ProcGenFunc signature to return bool for error reporting. - Implemented gen_perlin (Fractional Brownian Motion) in procedural/generator.cc. - Added support for sky texture in Renderer3D and its shader. - Integrated Perlin noise sky texture in test_3d_render.cc. - Caught and handled memory/generation errors in AssetManager and TextureManager. - Assigned reference numbers to all remaining tasks in documentation. handoff(Gemini): Side-quest complete. ProcGenFunc now returns bool. Perlin noise added and used for sky in 3D test. Windows build remains stable. All tasks numbered.
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.
3 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.