Merge pull request #83760 from Calinou/2d-shadows-add-property-hint

Add property hint for 2D shadow size project setting
This commit is contained in:
Rémi Verschelde 2023-10-22 12:13:28 +02:00
commit 9fb3c42850
No known key found for this signature in database
GPG Key ID: C3336907360768E1
2 changed files with 2 additions and 2 deletions

View File

@ -2759,7 +2759,7 @@ bool RendererCanvasRenderRD::free(RID p_rid) {
}
void RendererCanvasRenderRD::set_shadow_texture_size(int p_size) {
p_size = nearest_power_of_2_templated(p_size);
p_size = MAX(1, nearest_power_of_2_templated(p_size));
if (p_size == state.shadow_texture_size) {
return;
}

View File

@ -3345,7 +3345,7 @@ void RenderingServer::init() {
GLOBAL_DEF(PropertyInfo(Variant::INT, "rendering/lights_and_shadows/positional_shadow/soft_shadow_filter_quality", PROPERTY_HINT_ENUM, "Hard (Fastest),Soft Very Low (Faster),Soft Low (Fast),Soft Medium (Average),Soft High (Slow),Soft Ultra (Slowest)"), 2);
GLOBAL_DEF("rendering/lights_and_shadows/positional_shadow/soft_shadow_filter_quality.mobile", 0);
GLOBAL_DEF("rendering/2d/shadow_atlas/size", 2048);
GLOBAL_DEF(PropertyInfo(Variant::INT, "rendering/2d/shadow_atlas/size", PROPERTY_HINT_RANGE, "128,16384"), 2048);
// Number of commands that can be drawn per frame.
GLOBAL_DEF_RST(PropertyInfo(Variant::INT, "rendering/gl_compatibility/item_buffer_size", PROPERTY_HINT_RANGE, "128,1048576,1"), 16384);