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
This commit is contained in:
Martijn Berger
2014-03-07 23:16:09 +01:00
parent ef51b69009
commit dd2dca2f7e
20 changed files with 146 additions and 49 deletions

View File

@@ -76,6 +76,7 @@ public:
void *builtin_data;
ustring color_space;
ustring projection;
InterpolationType interpolation;
float projection_blend;
bool animated;