Fix shadow disabling settings
Fixes the SHADOW_CASTING_SETTING_OFF setting in GeometryInstance3D and the "shadows_disabled" render mode in spatial materials, which were not working before.
This commit is contained in:
parent
92a2380d96
commit
c46d1ea2b2
3 changed files with 11 additions and 8 deletions
|
|
@ -1139,7 +1139,7 @@ void RendererSceneCull::instance_geometry_set_cast_shadows_setting(RID p_instanc
|
|||
if (instance->scenario && instance->array_index >= 0) {
|
||||
InstanceData &idata = instance->scenario->instance_data[instance->array_index];
|
||||
|
||||
if (instance->cast_shadows != RS::SHADOW_CASTING_SETTING_SHADOWS_ONLY) {
|
||||
if (instance->cast_shadows != RS::SHADOW_CASTING_SETTING_OFF) {
|
||||
idata.flags |= InstanceData::FLAG_CAST_SHADOWS;
|
||||
} else {
|
||||
idata.flags &= ~uint32_t(InstanceData::FLAG_CAST_SHADOWS);
|
||||
|
|
@ -1603,7 +1603,7 @@ void RendererSceneCull::_update_instance(Instance *p_instance) {
|
|||
//always dirty when added
|
||||
idata.flags |= InstanceData::FLAG_REFLECTION_PROBE_DIRTY;
|
||||
}
|
||||
if (p_instance->cast_shadows != RS::SHADOW_CASTING_SETTING_SHADOWS_ONLY) {
|
||||
if (p_instance->cast_shadows != RS::SHADOW_CASTING_SETTING_OFF) {
|
||||
idata.flags |= InstanceData::FLAG_CAST_SHADOWS;
|
||||
}
|
||||
if (p_instance->cast_shadows == RS::SHADOW_CASTING_SETTING_SHADOWS_ONLY) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue