From 01b3442ceb51983b2df920259d13edf933a6bfe3 Mon Sep 17 00:00:00 2001 From: skal Date: Mon, 2 Feb 2026 17:10:39 +0100 Subject: fix(3d): Tighten torus proxy hull and ensure floor grid visibility - Adjusted Torus proxy hull in vs_main to 1.5x0.5x1.5 for better SDF fit. - Updated VisualDebug::add_box to use per-object local extents. - Standardized floor grid mapping in fs_main using planar p.xz projection. - Verified non-uniform scale and rotation robustness in test_3d_render. --- src/tests/test_3d_render.cc | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/tests/test_3d_render.cc') diff --git a/src/tests/test_3d_render.cc b/src/tests/test_3d_render.cc index 4c84c7c..d4d3525 100644 --- a/src/tests/test_3d_render.cc +++ b/src/tests/test_3d_render.cc @@ -239,8 +239,15 @@ int main(int argc, char** argv) { g_camera.aspect_ratio = platform_get_aspect_ratio(&platform_state); for (size_t i = 1; i < g_scene.objects.size(); ++i) { - g_scene.objects[i].rotation = - quat::from_axis(vec3(0, 1, 0), time * 2.0f + i); + // Rotation around a random-ish 3D axis + vec3 axis = + vec3(std::sin((float)i), std::cos((float)i), 0.5f).normalize(); + g_scene.objects[i].rotation = quat::from_axis(axis, time * 2.0f + i); + + // Non-uniform scaling variance + float s = 0.5f + 0.1f * std::sin(time * 0.5f + i); + g_scene.objects[i].scale = vec3(s, s * 1.4f, s * 0.8f); + g_scene.objects[i].position.y = std::sin(time * 3.0f + i) * 1.5f; } -- cgit v1.2.3