diff options
Diffstat (limited to 'scene/3d/light_3d.cpp')
-rw-r--r-- | scene/3d/light_3d.cpp | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/scene/3d/light_3d.cpp b/scene/3d/light_3d.cpp index cca84c2b85..16c82bf6d2 100644 --- a/scene/3d/light_3d.cpp +++ b/scene/3d/light_3d.cpp @@ -56,11 +56,8 @@ void Light3D::set_shadow(bool p_enable) { shadow = p_enable; RS::get_singleton()->light_set_shadow(light, p_enable); - if (type == RenderingServer::LIGHT_SPOT || type == RenderingServer::LIGHT_OMNI) { - update_configuration_warnings(); - } - notify_property_list_changed(); + update_configuration_warnings(); } bool Light3D::has_shadow() const { @@ -175,6 +172,10 @@ AABB Light3D::get_aabb() const { PackedStringArray Light3D::get_configuration_warnings() const { PackedStringArray warnings = VisualInstance3D::get_configuration_warnings(); + if (has_shadow() && OS::get_singleton()->get_current_rendering_method() == "gl_compatibility") { + warnings.push_back(RTR("Shadows are not supported when using the GL Compatibility backend yet. Support will be added in a future release.")); + } + if (!get_scale().is_equal_approx(Vector3(1, 1, 1))) { warnings.push_back(RTR("A light's scale does not affect the visual size of the light.")); } @@ -603,6 +604,10 @@ PackedStringArray OmniLight3D::get_configuration_warnings() const { warnings.push_back(RTR("Projector texture only works with shadows active.")); } + if (get_projector().is_valid() && OS::get_singleton()->get_current_rendering_method() == "gl_compatibility") { + warnings.push_back(RTR("Projector textures are not supported when using the GL Compatibility backend yet. Support will be added in a future release.")); + } + return warnings; } @@ -635,6 +640,10 @@ PackedStringArray SpotLight3D::get_configuration_warnings() const { warnings.push_back(RTR("Projector texture only works with shadows active.")); } + if (get_projector().is_valid() && OS::get_singleton()->get_current_rendering_method() == "gl_compatibility") { + warnings.push_back(RTR("Projector textures are not supported when using the GL Compatibility backend yet. Support will be added in a future release.")); + } + return warnings; } |