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. --- doc/COMPLETED.md | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'doc/COMPLETED.md') diff --git a/doc/COMPLETED.md b/doc/COMPLETED.md index cd448bf..148e410 100644 --- a/doc/COMPLETED.md +++ b/doc/COMPLETED.md @@ -2,6 +2,16 @@ This file tracks recently completed tasks, organized by completion date. +## Recently Completed (February 8, 2026) + +- [x] **3D Rendering & Shadow Improvements (Task A)** (February 8, 2026) + - [x] **Task A.1 (Shadow Investigation)**: Investigated mesh shadows appearing as bounding boxes. Documented that this is a design limitation of the hybrid renderer (AABB proxy for meshes in SDF pass). Created `doc/DEBUG_SHADOWS.md` with detailed analysis. + - [x] **Task A.2 (Plane Scaling Fix)**: Fixed `ObjectType::PLANE` distance calculation for non-uniform scaling. + - **Shader Fix**: Updated `map_scene` in both Linear and BVH pipelines to use normal-axis scale factor for planes. + - **Physics Fix**: Updated `PhysicsSystem::sample_sdf` to correctly scale plane distances on the CPU. + - **Mapping Cleanup**: Consolidated `ObjectType` to `type_id` mapping in `Renderer3D` and added support for `ObjectType::CUBE` in the shader path. + - **Result**: Ground planes with extreme non-uniform scaling now cast and receive shadows correctly, and physics collisions are accurate. + ## Recently Completed (February 7, 2026) - [x] **Audio Peak Measurement & Test Coverage Improvements** (February 7, 2026) -- cgit v1.2.3