diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2022-03-18 00:09:35 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-18 00:09:35 +0100 |
commit | 756178d34285e48be07f24d6acccbb36dbbd042c (patch) | |
tree | c4fada0c0194dfe8c9f8a22bfb875dd8cb8467cf /servers/rendering/renderer_scene_cull.cpp | |
parent | e195032cbc827ade3d9ce639cd1f06cd16c8b66d (diff) | |
parent | c45d2c242bf568363f0d6528dc142c0cac0eb1c8 (diff) | |
download | redot-engine-756178d34285e48be07f24d6acccbb36dbbd042c.tar.gz |
Merge pull request #59087 from clayjohn/sky-mode
Replace DirectionalLight3D's `use_in_sky_only` with `sky_mode` enum
Diffstat (limited to 'servers/rendering/renderer_scene_cull.cpp')
-rw-r--r-- | servers/rendering/renderer_scene_cull.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/servers/rendering/renderer_scene_cull.cpp b/servers/rendering/renderer_scene_cull.cpp index 485cd7ba9d..700ca7e167 100644 --- a/servers/rendering/renderer_scene_cull.cpp +++ b/servers/rendering/renderer_scene_cull.cpp @@ -2948,7 +2948,7 @@ void RendererSceneCull::_render_scene(const RendererSceneRender::CameraData *p_c //check shadow.. if (light) { - if (p_using_shadows && p_shadow_atlas.is_valid() && RSG::storage->light_has_shadow(E->base) && !(RSG::storage->light_get_type(E->base) == RS::LIGHT_DIRECTIONAL && RSG::storage->light_directional_is_sky_only(E->base))) { + if (p_using_shadows && p_shadow_atlas.is_valid() && RSG::storage->light_has_shadow(E->base) && !(RSG::storage->light_get_type(E->base) == RS::LIGHT_DIRECTIONAL && RSG::storage->light_directional_get_sky_mode(E->base) == RS::LIGHT_DIRECTIONAL_SKY_MODE_SKY_ONLY)) { lights_with_shadow.push_back(E); } //add to list @@ -3473,7 +3473,7 @@ void RendererSceneCull::render_probes() { cache->attenuation != RSG::storage->light_get_param(instance->base, RS::LIGHT_PARAM_ATTENUATION) || cache->spot_angle != RSG::storage->light_get_param(instance->base, RS::LIGHT_PARAM_SPOT_ANGLE) || cache->spot_attenuation != RSG::storage->light_get_param(instance->base, RS::LIGHT_PARAM_SPOT_ATTENUATION) || - cache->sky_only != RSG::storage->light_directional_is_sky_only(instance->base)) { + cache->sky_mode != RSG::storage->light_directional_get_sky_mode(instance->base)) { cache_dirty = true; } } @@ -3541,7 +3541,7 @@ void RendererSceneCull::render_probes() { cache->attenuation = RSG::storage->light_get_param(instance->base, RS::LIGHT_PARAM_ATTENUATION); cache->spot_angle = RSG::storage->light_get_param(instance->base, RS::LIGHT_PARAM_SPOT_ANGLE); cache->spot_attenuation = RSG::storage->light_get_param(instance->base, RS::LIGHT_PARAM_SPOT_ATTENUATION); - cache->sky_only = RSG::storage->light_directional_is_sky_only(instance->base); + cache->sky_mode = RSG::storage->light_directional_get_sky_mode(instance->base); idx++; } |