Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2013-02-12 19:51:05 +0400
committerTon Roosendaal <ton@blender.org>2013-02-12 19:51:05 +0400
commit58a6f0764916adecb71385cd43b917f1b708b334 (patch)
treeeb580e49dae0a513f81f8df970c5c5f9d3d5eccc /source/blender/render
parent6886ad268088a92fb8f9e694f9068dbfd75b06a4 (diff)
Bug fix #34213 (2)
Adding non-RGBA float buffers as texture crashes MipMap code. Images with less than 4 channels not supported (yet). Not sure if we ever should even... normals, Z, vectors, UV, Index, all don't like downsampling.
Diffstat (limited to 'source/blender/render')
-rw-r--r--source/blender/render/intern/source/imagetexture.c3
1 files changed, 3 insertions, 0 deletions
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);
}
}