1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-10 13:00:37 +00:00

Disabled depth test for line and handle materials

This commit is contained in:
Marc Garcia Puig
2025-02-25 22:56:56 +01:00
parent e7ac8e45a3
commit 57d8ef5d23

View File

@@ -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<Texture2D> 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);