diff options
-rw-r--r-- | source/blender/imbuf/intern/filter.c | 4 | ||||
-rw-r--r-- | source/blender/render/intern/source/imagetexture.c | 3 |
2 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/imbuf/intern/filter.c b/source/blender/imbuf/intern/filter.c index 51fee232034..9193954f1d6 100644 --- a/source/blender/imbuf/intern/filter.c +++ b/source/blender/imbuf/intern/filter.c @@ -506,6 +506,10 @@ void IMB_makemipmap(ImBuf *ibuf, int use_filter) imb_freemipmapImBuf(ibuf); + /* no mipmap for non RGBA images */ + if (ibuf->rect_float && ibuf->channels < 4) + return; + ibuf->miptot = 1; while (curmap < IB_MIPMAP_LEVELS) { diff --git a/source/blender/render/intern/source/imagetexture.c b/source/blender/render/intern/source/imagetexture.c index 55dadc14989..2827f90e4b6 100644 --- a/source/blender/render/intern/source/imagetexture.c +++ b/source/blender/render/intern/source/imagetexture.c @@ -1042,6 +1042,9 @@ static void image_mipmap_test(Tex *tex, ImBuf *ibuf) IMB_makemipmap(ibuf, tex->imaflag & TEX_GAUSS_MIP); BLI_unlock_thread(LOCK_IMAGE); } + /* if no mipmap could be made, fall back on non-mipmap render */ + if (ibuf->mipmap[0] == NULL) + if (tex->imaflag &= ~TEX_MIPMAP); } } |