From 2184a1043d1a071cdc78303b2247145bf3f18c0b Mon Sep 17 00:00:00 2001 From: skal Date: Mon, 2 Feb 2026 16:46:59 +0100 Subject: fix(3d): Correct debug box transforms and restore object textures - Updated VisualDebug to accept mat4 transforms, enabling wireframes to follow rotating objects. - Restored SDF bump mapping and floor grid texture in the fragment shader. - Added vec4::xyz() helper to mini_math.h. - Fixed Renderer3D to pass the full model matrix for debug visualization. --- src/util/mini_math.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/util/mini_math.h') diff --git a/src/util/mini_math.h b/src/util/mini_math.h index dc88ad4..56e6832 100644 --- a/src/util/mini_math.h +++ b/src/util/mini_math.h @@ -129,6 +129,10 @@ struct vec4 { : x(x), y(y), z(z), w(w) { } VEC_OPERATORS(vec4, 4) + + vec3 xyz() const { + return {x, y, z}; + } }; #endif /* defined(USE_VEC4) */ -- cgit v1.2.3