From b8e6929cafa41681f0b27ac104c9cf1d4e510837 Mon Sep 17 00:00:00 2001 From: skal Date: Sun, 8 Feb 2026 07:38:28 +0100 Subject: feat(3d): Fix ObjectType::PLANE scaling and consolidate ObjectType mapping - Implemented correct scaling for planes in both CPU (physics) and GPU (shaders) using the normal-axis scale factor. - Consolidated ObjectType to type_id mapping in Renderer3D to ensure consistency and support for CUBE. - Fixed overestimation of distance for non-uniformly scaled ground planes, which caused missing shadows. - Updated documentation and marked Task A.2 as completed. --- TODO.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'TODO.md') diff --git a/TODO.md b/TODO.md index b96405e..979c191 100644 --- a/TODO.md +++ b/TODO.md @@ -12,11 +12,7 @@ This file tracks prioritized tasks with detailed attack plans. - [x] Fixed mesh shadow scaling (excluded meshes from SDF scale factor) - [x] Fixed floor rendering artifacts (changed from PLANE to BOX) - [x] **Task A.1**: Investigate and fix missing shadows in test_mesh (Investigated: Shadows are present but box-shaped due to AABB proxy. See `doc/DEBUG_SHADOWS.md`.) - - [ ] **Task A.2**: Investigate and fix ObjectType::PLANE with non-uniform scaling - - **Issue**: PLANE with extreme non-uniform scaling (e.g., vec3(20, 0.01, 20)) causes incorrect SDF distance calculations in shadows - - **Workaround**: Changed test_mesh floor to use ObjectType::BOX instead - - **Root Cause**: sdPlane distance calculation doesn't account for non-uniform scaling when transformed to local space - - **Investigation needed**: Determine if PLANE should handle non-uniform scaling or if it's unsupported by design + - [x] **Task A.2**: Investigate and fix ObjectType::PLANE with non-uniform scaling (Fixed: Implemented correct scaling factor for planes in map_scene and PhysicsSystem). - [ ] **Task B: Move platform-specific conditional code into a single header location** - [ ] Abstract out `#if defined(DEMO_CROSS_COMPILE_WIN32)` statements from core `.cc` and `.h` sources. -- cgit v1.2.3