diff options
author | Martijn Berger <martijn.berger@gmail.com> | 2014-03-08 02:16:09 +0400 |
---|---|---|
committer | Martijn Berger <martijn.berger@gmail.com> | 2014-03-08 02:16:33 +0400 |
commit | dd2dca2f7e77e7521d13b78e875ffa58a90846f2 (patch) | |
tree | 26c0d371fbca7eb25e9060aabc5ef6fe56939cf2 /intern/cycles/render/image.h | |
parent | ef51b690090967f5576b88a528a79c5defb1ddd4 (diff) |
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
Diffstat (limited to 'intern/cycles/render/image.h')
-rw-r--r-- | intern/cycles/render/image.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/intern/cycles/render/image.h b/intern/cycles/render/image.h index 187c5fd0f02..85b6b512bae 100644 --- a/intern/cycles/render/image.h +++ b/intern/cycles/render/image.h @@ -49,8 +49,8 @@ public: ImageManager(); ~ImageManager(); - int add_image(const string& filename, void *builtin_data, bool animated, bool& is_float, bool& is_linear); - void remove_image(const string& filename, void *builtin_data); + int add_image(const string& filename, void *builtin_data, bool animated, bool& is_float, bool& is_linear, InterpolationType interpolation); + void remove_image(const string& filename, void *builtin_data, InterpolationType interpolation); bool is_float_image(const string& filename, void *builtin_data, bool& is_linear); void device_update(Device *device, DeviceScene *dscene, Progress& progress); @@ -79,6 +79,8 @@ private: bool need_load; bool animated; + InterpolationType interpolation; + int users; }; |