diff options
author | clayjohn <claynjohn@gmail.com> | 2022-10-07 10:15:39 -0700 |
---|---|---|
committer | clayjohn <claynjohn@gmail.com> | 2022-10-07 10:15:39 -0700 |
commit | 74654550793c27911898fe938bc172c64cfa689a (patch) | |
tree | b84bf2427abbf494b497b569d00f3662a750d5f6 /servers/rendering | |
parent | 1baefceababe8a0d63434a231c3799555a45d8e3 (diff) |
Fix material overlay overriding shadow casting logic
Material overlay should only cast a shadow if it can cast a shadow and
the instance can cast a shadow
Diffstat (limited to 'servers/rendering')
-rw-r--r-- | servers/rendering/renderer_scene_cull.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/servers/rendering/renderer_scene_cull.cpp b/servers/rendering/renderer_scene_cull.cpp index 66a64d4372..2b25e8962f 100644 --- a/servers/rendering/renderer_scene_cull.cpp +++ b/servers/rendering/renderer_scene_cull.cpp @@ -3862,7 +3862,7 @@ void RendererSceneCull::_update_dirty_instance(Instance *p_instance) { } if (p_instance->material_overlay.is_valid()) { - can_cast_shadows = can_cast_shadows || RSG::material_storage->material_casts_shadows(p_instance->material_overlay); + can_cast_shadows = can_cast_shadows && RSG::material_storage->material_casts_shadows(p_instance->material_overlay); is_animated = is_animated || RSG::material_storage->material_is_animated(p_instance->material_overlay); _update_instance_shader_uniforms_from_material(isparams, p_instance->instance_shader_uniforms, p_instance->material_overlay); } |