mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-07 01:23:52 +00:00
fix(markers): skip objects with NaN position/scale on update
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.
This commit is contained in:
parent
45dabaff44
commit
b1cfef8264
1 changed files with 5 additions and 0 deletions
|
|
@ -43,6 +43,11 @@ void EditorMarkers::update(const std::vector<PlacedObject>& objects) {
|
|||
std::vector<MarkerVertex> 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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue