From b1cfef8264dcfcc361087cdef0314e1be456408b Mon Sep 17 00:00:00 2001 From: Kelsi Date: Wed, 6 May 2026 07:56:26 -0700 Subject: [PATCH] fix(markers): skip objects with NaN position/scale on update MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A non-finite object transform would produce NaN vertex positions in the marker mesh — Vulkan validation flags it and dropping the entire batch leaves all markers invisible. Skip the bad object instead so the rest of the markers still render. --- tools/editor/editor_markers.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/editor/editor_markers.cpp b/tools/editor/editor_markers.cpp index c5dd2dc4..70020027 100644 --- a/tools/editor/editor_markers.cpp +++ b/tools/editor/editor_markers.cpp @@ -43,6 +43,11 @@ void EditorMarkers::update(const std::vector& objects) { std::vector verts; for (const auto& obj : objects) { + // Skip markers for objects with non-finite transform — would + // produce NaN vertex positions and trip Vulkan validation or + // collapse the entire vertex buffer to garbage. + if (!std::isfinite(obj.position.x) || !std::isfinite(obj.position.y) || + !std::isfinite(obj.position.z) || !std::isfinite(obj.scale)) continue; float s = 3.0f * obj.scale; float x = obj.position.x; float y = obj.position.y;