You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Add property hint for 2D shadow size project setting
Previously, it was possible to use zero or negative values, which are invalid. This also prevents crashing the engine by setting a shadow size of 0 or lower from a script.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user