summaryrefslogtreecommitdiffstats
path: root/drivers/gles3/storage/texture_storage.cpp
diff options
context:
space:
mode:
authorA Thousand Ships <96648715+AThousandShips@users.noreply.github.com>2024-03-03 12:49:08 +0100
committerA Thousand Ships <96648715+AThousandShips@users.noreply.github.com>2024-03-20 13:47:42 +0100
commit79ba22a73f238ebd110fc5f3744c3c12a9a59475 (patch)
treeff5d57ddb759c04297aa6482cdc389ca8bc0c2cf /drivers/gles3/storage/texture_storage.cpp
parentfe01776f05b1787b28b4a270d53037a3c25f4ca2 (diff)
downloadredot-engine-79ba22a73f238ebd110fc5f3744c3c12a9a59475.tar.gz
Use `Vector*` component-wise `min/max/clamp` functions where applicable
Diffstat (limited to 'drivers/gles3/storage/texture_storage.cpp')
-rw-r--r--drivers/gles3/storage/texture_storage.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gles3/storage/texture_storage.cpp b/drivers/gles3/storage/texture_storage.cpp
index a032535827..c955b3f708 100644
--- a/drivers/gles3/storage/texture_storage.cpp
+++ b/drivers/gles3/storage/texture_storage.cpp
@@ -2812,8 +2812,7 @@ void TextureStorage::_render_target_allocate_sdf(RenderTarget *rt) {
}
rt->process_size = size * scale / 100;
- rt->process_size.x = MAX(rt->process_size.x, 1);
- rt->process_size.y = MAX(rt->process_size.y, 1);
+ rt->process_size = rt->process_size.max(Size2i(1, 1));
glGenTextures(2, rt->sdf_texture_process);
glBindTexture(GL_TEXTURE_2D, rt->sdf_texture_process[0]);