1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-22 15:06:45 +00:00

Pad etcpak input to 4x4 blocks. Fixes #49981

This commit is contained in:
Lyuma
2022-01-18 20:29:39 -08:00
parent f8b8d0d4b8
commit b1b20f5f91
2 changed files with 59 additions and 9 deletions

View File

@@ -1434,12 +1434,11 @@ int Image::_get_dst_image_size(int p_width, int p_height, Format p_format, int &
}
// Set mipmap size.
// It might be necessary to put this after the minimum mipmap size check because of the possible occurrence of "1 >> 1".
if (r_mm_width) {
*r_mm_width = bw >> 1;
*r_mm_width = w;
}
if (r_mm_height) {
*r_mm_height = bh >> 1;
*r_mm_height = h;
}
// Reach target mipmap.