diff options
author | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2021-10-20 00:40:46 +0200 |
---|---|---|
committer | clayjohn <claynjohn@gmail.com> | 2022-03-17 14:00:02 -0700 |
commit | c45d2c242bf568363f0d6528dc142c0cac0eb1c8 (patch) | |
tree | 895ceb187050d15c94f5ad3a3e2de7c26e9be715 /servers/rendering/renderer_scene_cull.cpp | |
parent | 6228063972b23a1ed216956b0e1d87d303548996 (diff) | |
download | redot-engine-c45d2c242bf568363f0d6528dc142c0cac0eb1c8.tar.gz |
Replace DirectionalLight3D's `use_in_sky_only` with `sky_mode` enum
3 options are available:
- Light and Sky (default)
- Light Only (new)
- Sky Only (equivalent to `use_in_sky_only = true`)
Co-authored by: clayjohn <claynjohn@gmail.com>
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++; } |