diff options
| author | skal <pascal.massimino@gmail.com> | 2026-02-01 10:51:15 +0100 |
|---|---|---|
| committer | skal <pascal.massimino@gmail.com> | 2026-02-01 10:51:15 +0100 |
| commit | 8bdc4754647c9c6691130fa91d51fee93c5fc88f (patch) | |
| tree | 2cfd7f72a21541c488ea48629eef47a6774fc2c4 /PROJECT_CONTEXT.md | |
| parent | 7905abd9f7ad35231289e729b42e3ad57a943ff5 (diff) | |
feat: Implement 3D system and procedural texture manager
- 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.
Diffstat (limited to 'PROJECT_CONTEXT.md')
| -rw-r--r-- | PROJECT_CONTEXT.md | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/PROJECT_CONTEXT.md b/PROJECT_CONTEXT.md index fb4485d..b990347 100644 --- a/PROJECT_CONTEXT.md +++ b/PROJECT_CONTEXT.md @@ -43,9 +43,30 @@ Incoming tasks in no particular order: - `MainSequence`: Manages global resources (`device`, `queue`) and orchestrates the frame render. - Refactored `gpu.cc` to use `MainSequence`. - Moved concrete effects to `src/gpu/demo_effects.cc`. +- 13. Implement Procedural Texture system (Task #3 -> #1): + - `src/procedural/` module (Done). + - Integration with WebGPU: Generate textures at runtime and upload to GPU (Done). + - `src/gpu/texture_manager` implemented and tested. +- 14. Implement 3D system (Task #1 -> #2): + - `src/3d/` module (math, camera, scene, renderer) (Done). + - `Renderer3D` implemented with basic cube rendering (Done). + - `test_3d_render` mini-demo created (Debugging crash in `wgpuInstanceWaitAny`). +- 15. Shader Logic (Task #2 -> #3): + - Ray-object intersection & SDF rendering in WGSL. ## Session Decisions and Current State +### 3D Renderer Implementation +- **Renderer3D**: Encapsulates pipeline creation and render pass recording. +- **Shader**: Currently uses a simple vertex/fragment shader for cubes. +- **Storage**: Objects are stored in a `StorageBuffer` (instance data). +- **Test Tool**: `test_3d_render` created to isolate 3D development. +- **Issue**: `test_3d_render` crashes with "not implemented" in `wgpuInstanceWaitAny` on macOS. + +### Procedural Textures +- **TextureManager**: Handles CPU generation -> GPU upload. +- **API**: Supports `WGPUTexelCopyTextureInfo` (new API) with fallback macros for older headers. + ### Sequence & Effect System - **Architecture**: Implemented a hierarchical sequencing system. - **Effect**: Abstract base for visual elements. Supports `compute` (physics) and `render` (draw) phases. Idempotent `init` for shared asset loading. |
