From 73645a1047bffbf95b6a99ebda3f99e8536ff9f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Thu, 9 Oct 2025 19:35:41 +0200 Subject: [PATCH] Fix #147542: Overlay: Curve Sculpt Mode: Z-fighting with Cage overlay The overlay just needed a bit of Z bias to avoid Z fighting. --- .../overlay/shaders/overlay_sculpt_curves_cage_vert.glsl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/blender/draw/engines/overlay/shaders/overlay_sculpt_curves_cage_vert.glsl b/source/blender/draw/engines/overlay/shaders/overlay_sculpt_curves_cage_vert.glsl index 8422cce9383..a51fa78fea7 100644 --- a/source/blender/draw/engines/overlay/shaders/overlay_sculpt_curves_cage_vert.glsl +++ b/source/blender/draw/engines/overlay/shaders/overlay_sculpt_curves_cage_vert.glsl @@ -14,6 +14,8 @@ void main() { float3 world_pos = drw_point_object_to_world(pos); gl_Position = drw_point_world_to_homogenous(world_pos); + /* Small bias to always be on top of the geom. */ + gl_Position.z -= 1e-3f; final_color = float4(selection); final_color.a *= opacity;