From c45d2c242bf568363f0d6528dc142c0cac0eb1c8 Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Wed, 20 Oct 2021 00:40:46 +0200 Subject: 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 --- doc/classes/DirectionalLight3D.xml | 13 +++++++++++-- doc/classes/RenderingServer.xml | 13 +++++++++++-- 2 files changed, 22 insertions(+), 4 deletions(-) (limited to 'doc/classes') diff --git a/doc/classes/DirectionalLight3D.xml b/doc/classes/DirectionalLight3D.xml index ad2663a61b..754518239c 100644 --- a/doc/classes/DirectionalLight3D.xml +++ b/doc/classes/DirectionalLight3D.xml @@ -35,8 +35,8 @@ The distance from shadow split 2 to split 3. Relative to [member directional_shadow_max_distance]. Only used when [member directional_shadow_mode] is [constant SHADOW_PARALLEL_4_SPLITS]. - - If [code]true[/code], this [DirectionalLight3D] will not be used for anything except sky shaders. Use this for lights that impact your sky shader that you may want to hide from affecting the rest of the scene. For example, you may want to enable this when the sun in your sky shader falls below the horizon. + + Set whether this [DirectionalLight3D] is visible in the sky, in the scene, or both in the sky and in the scene. See [enum SkyMode] for options. @@ -49,5 +49,14 @@ Splits the view frustum in 4 areas, each with its own shadow map. This is the slowest directional shadow mode. + + Makes the light visible in both scene lighting and sky rendering. + + + Makes the light visible in scene lighting only (including direct lighting and global illumination). When using this mode, the light will not be visible from sky shaders. + + + Makes the light visible to sky shaders only. When using this mode the light will not cast light into the scene (either through direct lighting or through global illumination), but can be accessed through sky shaders. This can be useful, for example, when you want to control sky effects without illuminating the scene (during a night cycle, for example). + diff --git a/doc/classes/RenderingServer.xml b/doc/classes/RenderingServer.xml index 213dafa074..f1a15a08dd 100644 --- a/doc/classes/RenderingServer.xml +++ b/doc/classes/RenderingServer.xml @@ -1616,10 +1616,10 @@ Sets the shadow mode for this directional light. Equivalent to [member DirectionalLight3D.directional_shadow_mode]. See [enum LightDirectionalShadowMode] for options. - + - + If [code]true[/code], this light will not be used for anything except sky shaders. Use this for lights that impact your sky shader that you may want to hide from affecting the rest of the scene. For example, you may want to enable this when the sun in your sky shader falls below the horizon. @@ -3795,6 +3795,15 @@ Use 4 splits for shadow projection when using directional light. + + Use DirectionalLight3D in both sky rendering and scene lighting. + + + Only use DirectionalLight3D in scene lighting. + + + Only use DirectionalLight3D in sky rendering. + Lowest shadow filtering quality (fastest). Soft shadows are not available with this quality setting, which means the [member Light3D.shadow_blur] property is ignored if [member Light3D.light_size] and [member Light3D.light_angular_distance] is [code]0.0[/code]. [b]Note:[/b] The variable shadow blur performed by [member Light3D.light_size] and [member Light3D.light_angular_distance] is still effective when using hard shadow filtering. In this case, [member Light3D.shadow_blur] [i]is[/i] taken into account. However, the results will not be blurred, instead the blur amount is treated as a maximum radius for the penumbra. -- cgit v1.2.3