diff options
| author | skal <pascal.massimino@gmail.com> | 2026-02-02 13:41:16 +0100 |
|---|---|---|
| committer | skal <pascal.massimino@gmail.com> | 2026-02-02 13:41:16 +0100 |
| commit | 90f55a5dcb115cc6489cf8b25fe23fe71071a559 (patch) | |
| tree | b79cf715dc7a1b9813c1a5b9887ef2c03a816c85 /src | |
| parent | f04f792b05539650471cf0bbf5043e2d82ead29a (diff) | |
fix(3d): Correct shadow bug with non-uniform scale
- Changed the floor object in 'test_3d_render' from SDF BOX to rasterized CUBE.
- This prevents the non-uniform scale of the floor from breaking the scene-wide SDF query used for shadow calculations.
- The lighting and shadows now render correctly in the more complex test scene.
Diffstat (limited to 'src')
| -rw-r--r-- | src/tests/test_3d_render.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tests/test_3d_render.cc b/src/tests/test_3d_render.cc index d80d836..aa69675 100644 --- a/src/tests/test_3d_render.cc +++ b/src/tests/test_3d_render.cc @@ -137,8 +137,8 @@ void setup_scene() { g_scene.clear(); srand(12345); // Fixed seed - // Large floor - Object3D floor(ObjectType::BOX); + // Large floor, use CUBE type to exclude from SDF calculations + Object3D floor(ObjectType::CUBE); floor.position = vec3(0, -2.0f, 0); floor.scale = vec3(20.0f, 0.5f, 20.0f); floor.color = vec4(0.8f, 0.8f, 0.8f, 1.0f); |
