Fix #126464: Subdiv optimal display edges causes broken wires on Metal

Caused by d1049f6082.
The old 255 FORCE_HIDE value converts to 1.0f as a float, not 255.0f.
This commit is contained in:
Hans Goudey
2024-08-22 09:48:44 -04:00
parent 65930d2a03
commit 6e845f54c3

View File

@@ -69,7 +69,12 @@ static void extract_edge_factor_mesh(const MeshRenderData &mr, MutableSpan<T> vb
for (const int corner : faces[face]) {
const int edge = corner_edges[corner];
if (!optimal_display_edges.is_empty() && !optimal_display_edges[edge]) {
vbo_data[corner] = FORCE_HIDE;
if constexpr (std::is_same_v<T, float>) {
vbo_data[corner] = 1.0f;
}
else {
vbo_data[corner] = FORCE_HIDE;
}
continue;
}