Merge pull request #83199 from Repiteo/texture-storage-default-scale

Fix `TextureStorage` not assigning default scale
This commit is contained in:
Rémi Verschelde 2023-10-24 10:53:56 +02:00
commit 64f80295e5
No known key found for this signature in database
GPG Key ID: C3336907360768E1
2 changed files with 8 additions and 2 deletions

View File

@ -2314,7 +2314,9 @@ Rect2i TextureStorage::_render_target_get_sdf_rect(const RenderTarget *rt) const
scale = 200;
} break;
default: {
}
ERR_PRINT("Invalid viewport SDF oversize, defaulting to 100%.");
scale = 100;
} break;
}
margin = (rt->size * scale / 100) - rt->size;
@ -2391,6 +2393,7 @@ void TextureStorage::_render_target_allocate_sdf(RenderTarget *rt) {
scale = 25;
} break;
default: {
ERR_PRINT("Invalid viewport SDF scale, defaulting to 100%.");
scale = 100;
} break;
}

View File

@ -3511,7 +3511,9 @@ Rect2i TextureStorage::_render_target_get_sdf_rect(const RenderTarget *rt) const
scale = 200;
} break;
default: {
}
ERR_PRINT("Invalid viewport SDF oversize, defaulting to 100%.");
scale = 100;
} break;
}
margin = (rt->size * scale / 100) - rt->size;
@ -3603,6 +3605,7 @@ void TextureStorage::_render_target_allocate_sdf(RenderTarget *rt) {
scale = 25;
} break;
default: {
ERR_PRINT("Invalid viewport SDF scale, defaulting to 100%.");
scale = 100;
} break;
}