diff options
author | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2022-02-24 22:55:14 +0100 |
---|---|---|
committer | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2022-02-25 15:17:35 +0100 |
commit | b1a295b739eb056557e9f2fe47ac80be6cc6d79d (patch) | |
tree | bc99029840febd9b84addbf366f8cfd66af314ba /servers/rendering_server.h | |
parent | 4dc8214831d1617e7f5f06e8294fb37ea23dae59 (diff) | |
download | redot-engine-b1a295b739eb056557e9f2fe47ac80be6cc6d79d.tar.gz |
Implement distance fade properties in OmniLight3D and SpotLight3D
This can be used to fade lights and their shadows in the distance,
similar to Decal nodes. This can bring significant performance
improvements, especially for lights with shadows enabled and when
using higher-than-default shadow quality settings.
While lights can be smoothly faded out over distance, shadows are
currently "all or nothing" since per-light shadow color is no longer
customizable in the Vulkan renderer. This may result in noticeable
pop-in when leaving the shadow cutoff distance, but depending on the
scene, it may not always be that noticeable.
Diffstat (limited to 'servers/rendering_server.h')
-rw-r--r-- | servers/rendering_server.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/servers/rendering_server.h b/servers/rendering_server.h index 5e58afe718..71460c2d5d 100644 --- a/servers/rendering_server.h +++ b/servers/rendering_server.h @@ -443,6 +443,7 @@ public: virtual void light_set_projector(RID p_light, RID p_texture) = 0; virtual void light_set_negative(RID p_light, bool p_enable) = 0; virtual void light_set_cull_mask(RID p_light, uint32_t p_mask) = 0; + virtual void light_set_distance_fade(RID p_light, bool p_enabled, float p_begin, float p_shadow, float p_length) = 0; virtual void light_set_reverse_cull_face_mode(RID p_light, bool p_enabled) = 0; enum LightBakeMode { |