From a6a223bcc10a2ab89de3dc06d744a804d0bf94e9 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Thu, 24 Oct 2024 09:50:03 +0200 Subject: [PATCH] Prevent 'too small' starts from not rendering. Not actually part of CURA-12188 but I was in the neighbourhood anyway. --- plugins/SimulationView/layers3d.shader | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/SimulationView/layers3d.shader b/plugins/SimulationView/layers3d.shader index 2bf77e89fa..494a07083d 100644 --- a/plugins/SimulationView/layers3d.shader +++ b/plugins/SimulationView/layers3d.shader @@ -360,8 +360,8 @@ geometry41core = ((v_prev_line_type[0] != 1) && (v_line_type[0] == 1)) || ((v_prev_line_type[0] != 4) && (v_line_type[0] == 4)) )) { - float w = size_x; - float h = size_y; + float w = max(0.05, size_x); + float h = max(0.05, size_y); myEmitVertex(v_vertex[0] + vec3( w, h, w), u_starts_color, normalize(vec3( 1.0, 1.0, 1.0)), viewProjectionMatrix * (gl_in[0].gl_Position + vec4( w, h, w, 0.0))); // Front-top-left myEmitVertex(v_vertex[0] + vec3(-w, h, w), u_starts_color, normalize(vec3(-1.0, 1.0, 1.0)), viewProjectionMatrix * (gl_in[0].gl_Position + vec4(-w, h, w, 0.0))); // Front-top-right