Force mipmaps off when importing RGBA4444 textures
This commit is contained in:
parent
f3c7019177
commit
0c3af32d77
2 changed files with 8 additions and 0 deletions
|
|
@ -106,9 +106,15 @@ static void _compress_etc(Image *p_img, float p_lossy_quality, bool force_etc1_f
|
|||
// If VRAM compression is using ETC, but image has alpha, convert to RGBA4444 or LA8
|
||||
// This saves space while maintaining the alpha channel
|
||||
if (detected_channels == Image::USED_CHANNELS_RGBA) {
|
||||
|
||||
if (p_img->has_mipmaps()) {
|
||||
// Image doesn't support mipmaps with RGBA4444 textures
|
||||
p_img->clear_mipmaps();
|
||||
}
|
||||
p_img->convert(Image::FORMAT_RGBA4444);
|
||||
return;
|
||||
} else if (detected_channels == Image::USE_CHANNELS_LA) {
|
||||
|
||||
p_img->convert(Image::FORMAT_LA8);
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue