Skip to content

Commit 8e0c0d7

Browse files
committed
Improve display for lightmap probes in the editor
- Use the default Back cull mode to improve performance slightly and prevent obstructing the camera. - Fade probes when the camera gets close as to be less intrusive.
1 parent 58a7f9b commit 8e0c0d7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

editor/plugins/gizmos/lightmap_gi_gizmo_plugin.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,10 @@ LightmapGIGizmoPlugin::LightmapGIGizmoPlugin() {
4444

4545
Ref<StandardMaterial3D> mat = memnew(StandardMaterial3D);
4646
mat->set_shading_mode(StandardMaterial3D::SHADING_MODE_UNSHADED);
47-
mat->set_cull_mode(StandardMaterial3D::CULL_DISABLED);
47+
// Fade out probes when camera gets too close to them.
48+
mat->set_distance_fade(StandardMaterial3D::DISTANCE_FADE_PIXEL_DITHER);
49+
mat->set_distance_fade_min_distance(0.5);
50+
mat->set_distance_fade_max_distance(1.5);
4851
mat->set_flag(StandardMaterial3D::FLAG_ALBEDO_FROM_VERTEX_COLOR, true);
4952
mat->set_flag(StandardMaterial3D::FLAG_SRGB_VERTEX_COLOR, false);
5053
mat->set_flag(StandardMaterial3D::FLAG_DISABLE_FOG, true);

0 commit comments

Comments
 (0)