| Age | Commit message (Collapse) | Author |
|
Replace individual pipeline pointers with map-based system.
- Changed from 3 pointers to std::map<string, ComputePipelineInfo>
- Unified get_or_create_compute_pipeline() for lazy init
- Unified dispatch_compute() for all shaders
- Simplified create_gpu_*_texture() methods (~390 lines removed)
handoff(Claude): GPU procedural texture refactoring complete
|
|
Complete Phase 2 implementation:
- gen_perlin.wgsl: FBM with configurable octaves, amplitude decay
- gen_grid.wgsl: Grid pattern with configurable spacing/thickness
- TextureManager extensions: create_gpu_perlin_texture(), create_gpu_grid_texture()
- Asset packer now validates gen_noise, gen_perlin, gen_grid for PROC_GPU()
- 3 compute pipelines (lazy-init on first use)
Shader parameters:
- gen_perlin: seed, frequency, amplitude, amplitude_decay, octaves (32 bytes)
- gen_grid: width, height, grid_size, thickness (16 bytes)
test_3d_render migration:
- Replaced CPU sky texture (gen_perlin) with GPU version
- Replaced CPU noise texture (gen_noise) with GPU version
- Added new GPU grid texture (256x256, 32px grid, 2px lines)
Size impact:
- gen_perlin.wgsl: ~200 bytes (compressed)
- gen_grid.wgsl: ~100 bytes (compressed)
- Total Phase 2 code: ~300 bytes
- Cumulative (Phase 1+2): ~600 bytes
Testing:
- All 34 tests passing (100%)
- test_gpu_procedural validates all generators
- test_3d_render uses 3 GPU textures (noise, perlin, grid)
Next: Phase 3 - Variable dimensions, async generation, pipeline caching
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
|
Phase 1 implementation complete:
- GPU compute shader for noise generation (gen_noise.wgsl)
- TextureManager extensions: create_gpu_noise_texture(), dispatch_noise_compute()
- Asset packer PROC_GPU() syntax support with validation
- ShaderComposer integration for #include resolution
- Zero CPU memory overhead (GPU-only textures)
- Init-time and on-demand generation modes
Technical details:
- 8×8 workgroup size for 256×256 textures
- UniformBuffer for params (width, height, seed, frequency)
- Storage texture binding (rgba8unorm, write-only)
- Lazy pipeline compilation on first use
- ~300 bytes code (Phase 1)
Testing:
- New test: test_gpu_procedural.cc (passes)
- All 34 tests passing (100%)
Future phases:
- Phase 2: Add gen_perlin, gen_grid compute shaders
- Phase 3: Variable dimensions, async generation
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
|
shader composition"
This reverts commit 16c2cdce6ad1d89d3c537f2c2cff743449925125.
|
|
composition
|
|
- 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.
|
|
- Fixed test_sequence by restoring MainSequence::init_test for mocking.
- Corrected CMakeLists.txt dependencies and source groupings to prevent duplicate symbols.
- standardizing Effect constructor signature for seq_compiler compatibility.
- Implemented Hybrid3DEffect using bumpy Renderer3D and procedural NOISE_TEX.
- Updated MainSequence to support depth buffer for 3D elements.
- Formatted all source files with clang-format.
|
|
- Added depth buffer support to MainSequence.
- Implemented Hybrid3DEffect for the main timeline.
- Fixed effect initialization order in MainSequence.
- Ensured depth-stencil compatibility for all scene effects.
- Updated demo sequence with 3D elements and post-processing.
|
|
- Replaced white noise with smooth value-like noise.
- Implemented periodic texture generation (seam blending).
- Integrated bump mapping into Renderer3D using finite difference of displaced SDF.
- Updated test_3d_render with noise texture and multiple SDF shapes (Box, Sphere, Torus).
|
|
- Extended mini_math.h with mat4 multiplication and affine transforms.
- Implemented TextureManager for runtime procedural texture generation and GPU upload.
- Added 3D system components: Camera, Object, Scene, and Renderer3D.
- Created test_3d_render mini-demo for interactive 3D verification.
- Fixed WebGPU validation errors regarding depthSlice and unimplemented WaitAny.
|