diff options
| author | skal <pascal.massimino@gmail.com> | 2026-02-07 08:56:11 +0100 |
|---|---|---|
| committer | skal <pascal.massimino@gmail.com> | 2026-02-07 08:56:11 +0100 |
| commit | 9061e7cd1b85ffff55f74157be4a67a7d9148143 (patch) | |
| tree | 73787b9f2f5ef5a48c7b5238b0b78ad3680f7bfc /TODO.md | |
| parent | da16d32f1e1adab7e461cd228e5fcecc60e1a41c (diff) | |
docs: Add Task #68 for mesh wireframe rendering in debug mode
Adds low-priority task to enhance visual debug mode with wireframe overlay
for mesh objects.
**Current State:**
Visual debug mode shows normals for all objects (SDF primitives and meshes)
**Proposed Enhancement:**
Show triangle edges as lines for mesh objects to visualize mesh structure
**Implementation:**
- Extend VisualDebug class with mesh wireframe function
- For each triangle: draw 3 lines connecting vertices (v0→v1, v1→v2, v2→v0)
- Transform vertices to world space using model matrix
- Use distinct color (cyan for edges, yellow for normals)
- Guard with !STRIP_ALL to avoid production overhead
**Use Cases:**
- Verify mesh topology and face orientation
- Debug mesh loading/transformation issues
- Visualize mesh structure alongside SDF primitives
- Check for degenerate triangles or mesh artifacts
**Technical Approach:**
- Access mesh via AssetManager::GetMeshAsset()
- Iterate through indices in groups of 3
- Use existing VisualDebug::draw_line() API
- Transform: world_pos = model_matrix * local_pos
**Priority:** Low (debug visualization only, not production feature)
This complements the existing normal visualization and improves mesh
debugging capabilities.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Diffstat (limited to 'TODO.md')
| -rw-r--r-- | TODO.md | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -350,6 +350,26 @@ This file tracks prioritized tasks with detailed attack plans. - Increased particle usage: Added 5 ParticleSprayEffect instances throughout demo (6b, 12b, 17b, 24b, 56b) - Result: Particles now render as fading transparent circles instead of opaque squares - [ ] **Task #55: SDF Random Planes Intersection**: Implement `sdPolyhedron` (crystal/gem shapes) via plane intersection. +- [ ] **Task #68: Visual Debug - Mesh Wireframe Rendering**: Show triangle edges as lines for mesh objects + - **Current**: Visual debug mode shows normals for all objects (SDF and meshes) + - **Goal**: Add wireframe overlay for mesh objects to visualize triangle structure + - **Implementation**: + - Extend `VisualDebug` class with mesh wireframe rendering function + - For each mesh triangle: draw 3 lines connecting vertices (v0→v1, v1→v2, v2→v0) + - Use world-space positions (transform by model matrix) + - Color: distinct from normals (e.g., cyan for edges, yellow for normals) + - Only render when debug mode enabled (`!STRIP_ALL`) + - **Use Cases**: + - Verify mesh topology and face orientation + - Debug mesh loading/transformation issues + - Visualize mesh deformation or animation + - Check for degenerate triangles or mesh artifacts + - **Technical Details**: + - Access mesh data via `AssetManager::GetMeshAsset()` + - Iterate through indices in groups of 3 (triangles) + - Draw lines using existing `VisualDebug::draw_line()` API + - Transform vertices: `world_pos = model_matrix * local_pos` + - **Priority**: Low (debug visualization, not production feature) - [ ] **Task #54: Tracy Integration**: Integrate Tracy debugger for performance profiling. - [ ] **Task #58: Advanced Shader Factorization**: Further factorize WGSL code into smaller, reusable snippets. - [ ] **Task #59: Comprehensive RNG Library**: Add WGSL snippets for float/vec2/vec3 noise (Perlin, Gyroid, etc.) and random number generators. |
