Cycles: Add support for single channel float textures on CPU.
authorThomas Dinges <blender@dingto.org>
Mon, 9 May 2016 10:51:42 +0000 (12:51 +0200)
committerThomas Dinges <blender@dingto.org>
Wed, 11 May 2016 19:58:34 +0000 (21:58 +0200)
commit4a4f043bc4235c046d2b58e00f2b80665ded11bf
tree58f68254573aece49f2b6ab67ffcb8ba1fc9c08f
parent544b76ac9cf79bcc64b9f8248984f1d408d32eb8
Cycles: Add support for single channel float textures on CPU.

Until now, single channel textures were packed into a float4, wasting 3 floats per pixel. Memory usage of such textures is now reduced by 3/4.
Voxel Attributes such as density, flame and heat benefit from this, but also Bumpmaps with one channel.
This commit also includes some cleanup and code deduplication for image loading.

Example Smoke render from Cosmos Laundromat: http://www.pasteall.org/pic/show.php?id=102972
Memory here went down from ~600MB to ~300MB.

Reviewers: #cycles, brecht

Differential Revision: https://developer.blender.org/D1981
intern/cycles/device/device_cpu.cpp
intern/cycles/kernel/kernel_compat_cpu.h
intern/cycles/kernel/kernel_globals.h
intern/cycles/kernel/kernels/cpu/kernel.cpp
intern/cycles/render/image.cpp
intern/cycles/render/image.h
intern/cycles/render/nodes.cpp
intern/cycles/render/scene.h
intern/cycles/util/util_texture.h