Fix Marker3D editor gizmo being darker than intended for negative axis lines

The brightness of those lines was intentionally lowered to work around
a bug, but this bug was fixed a long time ago.
This commit is contained in:
Hugo Locurcio 2026-03-03 01:31:42 +01:00
parent 778cf54dab
commit d65562366c
No known key found for this signature in database
GPG key ID: 46ACE49F61685096

View file

@ -63,22 +63,20 @@ Marker3DGizmoPlugin::Marker3DGizmoPlugin() {
const Color color_x = EditorNode::get_singleton()->get_editor_theme()->get_color(SNAME("axis_x_color"), EditorStringName(Editor));
cursor_colors.push_back(color_x);
cursor_colors.push_back(color_x);
// FIXME: Use less strong darkening factor once GH-48573 is fixed.
// The current darkening factor compensates for lines being too bright in the 3D editor.
cursor_colors.push_back(color_x.lerp(Color(0, 0, 0), 0.75));
cursor_colors.push_back(color_x.lerp(Color(0, 0, 0), 0.75));
cursor_colors.push_back(color_x.darkened(0.5));
cursor_colors.push_back(color_x.darkened(0.5));
const Color color_y = EditorNode::get_singleton()->get_editor_theme()->get_color(SNAME("axis_y_color"), EditorStringName(Editor));
cursor_colors.push_back(color_y);
cursor_colors.push_back(color_y);
cursor_colors.push_back(color_y.lerp(Color(0, 0, 0), 0.75));
cursor_colors.push_back(color_y.lerp(Color(0, 0, 0), 0.75));
cursor_colors.push_back(color_y.darkened(0.5));
cursor_colors.push_back(color_y.darkened(0.5));
const Color color_z = EditorNode::get_singleton()->get_editor_theme()->get_color(SNAME("axis_z_color"), EditorStringName(Editor));
cursor_colors.push_back(color_z);
cursor_colors.push_back(color_z);
cursor_colors.push_back(color_z.lerp(Color(0, 0, 0), 0.75));
cursor_colors.push_back(color_z.lerp(Color(0, 0, 0), 0.75));
cursor_colors.push_back(color_z.darkened(0.5));
cursor_colors.push_back(color_z.darkened(0.5));
Ref<StandardMaterial3D> mat = memnew(StandardMaterial3D);
mat->set_shading_mode(StandardMaterial3D::SHADING_MODE_UNSHADED);