From 57d8ef5d2343c669715798345a84d32d91bc0c4c Mon Sep 17 00:00:00 2001 From: Marc Garcia Puig Date: Tue, 25 Feb 2025 22:56:56 +0100 Subject: [PATCH] Disabled depth test for line and handle materials --- editor/plugins/polygon_3d_editor_plugin.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/editor/plugins/polygon_3d_editor_plugin.cpp b/editor/plugins/polygon_3d_editor_plugin.cpp index 9d7567f2528..f07ce22127c 100644 --- a/editor/plugins/polygon_3d_editor_plugin.cpp +++ b/editor/plugins/polygon_3d_editor_plugin.cpp @@ -560,6 +560,7 @@ Polygon3DEditor::Polygon3DEditor() { line_material->set_flag(StandardMaterial3D::FLAG_ALBEDO_FROM_VERTEX_COLOR, true); line_material->set_flag(StandardMaterial3D::FLAG_SRGB_VERTEX_COLOR, true); line_material->set_flag(StandardMaterial3D::FLAG_DISABLE_FOG, true); + line_material->set_flag(StandardMaterial3D::FLAG_DISABLE_DEPTH_TEST, true); line_material->set_albedo(Color(1, 1, 1)); handle_material.instantiate(); @@ -569,6 +570,7 @@ Polygon3DEditor::Polygon3DEditor() { handle_material->set_flag(StandardMaterial3D::FLAG_ALBEDO_FROM_VERTEX_COLOR, true); handle_material->set_flag(StandardMaterial3D::FLAG_SRGB_VERTEX_COLOR, true); handle_material->set_flag(StandardMaterial3D::FLAG_DISABLE_FOG, true); + handle_material->set_flag(StandardMaterial3D::FLAG_DISABLE_DEPTH_TEST, true); Ref handle = EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("Editor3DHandle"), EditorStringName(EditorIcons)); handle_material->set_point_size(handle->get_width()); handle_material->set_texture(StandardMaterial3D::TEXTURE_ALBEDO, handle);