Add support for multiple interpolation modes on cycles image textures
authorMartijn Berger <martijn.berger@gmail.com>
Fri, 7 Mar 2014 22:16:09 +0000 (23:16 +0100)
committerMartijn Berger <martijn.berger@gmail.com>
Fri, 7 Mar 2014 22:16:33 +0000 (23:16 +0100)
commitdd2dca2f7e77e7521d13b78e875ffa58a90846f2
tree26c0d371fbca7eb25e9060aabc5ef6fe56939cf2
parentef51b690090967f5576b88a528a79c5defb1ddd4
Add support for multiple interpolation modes on cycles image textures

All textures are sampled bi-linear currently with the exception of OSL there texture sampling is fixed and set to smart bi-cubic.

This patch adds user control to this setting.

Added:
- bits to DNA / RNA in the form of an enum for supporting multiple interpolations types
- changes to the image texture node drawing code ( add enum)
- to ImageManager (this needs to know to allocate second texture when interpolation type is different)
- to node compiler (pass on interpolation type)
- to device tex_alloc this also needs to get the concept of multiple interpolation types
- implementation for doing non interpolated lookup for cuda and cpu
- implementation where we pass this along to osl ( this makes OSL also do linear untill I add smartcubic to the interface / DNA/ RNA)

Reviewers: brecht, dingto

Reviewed By: brecht

CC: dingto, venomgfx
Differential Revision: https://developer.blender.org/D317
20 files changed:
intern/cycles/blender/blender_shader.cpp
intern/cycles/device/device.h
intern/cycles/device/device_cpu.cpp
intern/cycles/device/device_cuda.cpp
intern/cycles/device/device_multi.cpp
intern/cycles/device/device_network.cpp
intern/cycles/device/device_opencl.cpp
intern/cycles/kernel/kernel.cpp
intern/cycles/kernel/kernel.h
intern/cycles/kernel/kernel_compat_cpu.h
intern/cycles/kernel/shaders/node_image_texture.osl
intern/cycles/kernel/svm/svm_image.h
intern/cycles/render/image.cpp
intern/cycles/render/image.h
intern/cycles/render/nodes.cpp
intern/cycles/render/nodes.h
intern/cycles/util/util_types.h
source/blender/editors/space_node/drawnode.c
source/blender/makesdna/DNA_node_types.h
source/blender/makesrna/intern/rna_nodetree.c