diff options
author | Juan Linietsky <juan@godotengine.org> | 2018-11-02 12:25:43 -0300 |
---|---|---|
committer | Juan Linietsky <juan@godotengine.org> | 2018-11-02 12:26:11 -0300 |
commit | 08612e1cfde5dbcc42468cd17104601eaf3e45fb (patch) | |
tree | c0e2289b1ae743906a93803792039004c6113839 /editor | |
parent | 9b2c441ae387a2b198f80388c5354051c4b69ed7 (diff) |
No longer force mipmaps on import of VRAM textures, closes #10221
Diffstat (limited to 'editor')
-rw-r--r-- | editor/import/resource_importer_texture.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/editor/import/resource_importer_texture.cpp b/editor/import/resource_importer_texture.cpp index 5eb1a42f9f..8e91a88adb 100644 --- a/editor/import/resource_importer_texture.cpp +++ b/editor/import/resource_importer_texture.cpp @@ -235,7 +235,7 @@ void ResourceImporterTexture::_save_stex(const Ref<Image> &p_image, const String if (p_streamable) format |= StreamTexture::FORMAT_BIT_STREAM; - if (p_mipmaps || p_compress_mode == COMPRESS_VIDEO_RAM) //VRAM always uses mipmaps + if (p_mipmaps) format |= StreamTexture::FORMAT_BIT_HAS_MIPMAPS; //mipmaps bit if (p_detect_3d) format |= StreamTexture::FORMAT_BIT_DETECT_3D; @@ -310,7 +310,9 @@ void ResourceImporterTexture::_save_stex(const Ref<Image> &p_image, const String case COMPRESS_VIDEO_RAM: { Ref<Image> image = p_image->duplicate(); - image->generate_mipmaps(p_force_normal); + if (p_mipmaps) { + image->generate_mipmaps(p_force_normal); + } if (p_force_rgbe && image->get_format() >= Image::FORMAT_R8 && image->get_format() <= Image::FORMAT_RGBE9995) { image->convert(Image::FORMAT_RGBE9995); |