summaryrefslogtreecommitdiff
path: root/servers/rendering/renderer_rd
diff options
context:
space:
mode:
authorHugo Locurcio <hugo.locurcio@hugo.pro>2022-02-04 16:41:08 +0100
committerHugo Locurcio <hugo.locurcio@hugo.pro>2022-02-04 16:41:08 +0100
commite4eafb254aa873fedcbb6712bf98bba74d8556b3 (patch)
tree2d4277afa4e4712977bb40cda97f835942559be8 /servers/rendering/renderer_rd
parent8495be9cece924b22a8148ce335d04836027bc40 (diff)
Enable 16-bit shadow atlas by default in the RenderingServer methods
16-bit shadow atlases are already the default in the project settings, but low-level methods used 24-bit shadows by default. This makes low-level methods more consistent with the default project settings to avoid accidental performance issues when users change the shadow size at run-time.
Diffstat (limited to 'servers/rendering/renderer_rd')
-rw-r--r--servers/rendering/renderer_rd/renderer_scene_render_rd.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/servers/rendering/renderer_rd/renderer_scene_render_rd.h b/servers/rendering/renderer_rd/renderer_scene_render_rd.h
index 899d2d763d..09c828ba37 100644
--- a/servers/rendering/renderer_rd/renderer_scene_render_rd.h
+++ b/servers/rendering/renderer_rd/renderer_scene_render_rd.h
@@ -293,7 +293,7 @@ private:
uint32_t smallest_subdiv = 0;
int size = 0;
- bool use_16_bits = false;
+ bool use_16_bits = true;
RID depth;
RID fb; //for copying
@@ -333,7 +333,7 @@ private:
int light_count = 0;
int size = 0;
- bool use_16_bits = false;
+ bool use_16_bits = true;
int current_light = 0;
} directional_shadow;
@@ -981,7 +981,7 @@ public:
/* SHADOW ATLAS API */
virtual RID shadow_atlas_create() override;
- virtual void shadow_atlas_set_size(RID p_atlas, int p_size, bool p_16_bits = false) override;
+ virtual void shadow_atlas_set_size(RID p_atlas, int p_size, bool p_16_bits = true) override;
virtual void shadow_atlas_set_quadrant_subdivision(RID p_atlas, int p_quadrant, int p_subdivision) override;
virtual bool shadow_atlas_update_light(RID p_atlas, RID p_light_instance, float p_coverage, uint64_t p_light_version) override;
_FORCE_INLINE_ bool shadow_atlas_owns_light_instance(RID p_atlas, RID p_light_intance) {
@@ -1002,7 +1002,7 @@ public:
return Size2(atlas->size, atlas->size);
}
- virtual void directional_shadow_atlas_set_size(int p_size, bool p_16_bits = false) override;
+ virtual void directional_shadow_atlas_set_size(int p_size, bool p_16_bits = true) override;
virtual int get_directional_light_shadow_size(RID p_light_intance) override;
virtual void set_directional_shadow_count(int p_count) override;