diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-10-22 17:23:45 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-10-22 17:53:06 +0400 |
commit | d2d1b19170c5790b2ef971f5d825d3c36e008513 (patch) | |
tree | 6f72ebf7152740c2bf3390418d2762fa6655c745 /intern/cycles/render | |
parent | c24698a37e1382c6f2ee3c8da935a3399a7836b4 (diff) |
Cycles: Expose volume voxel data interpolation to the interface
It is per-material setting which could be found under the Volume settings
in the material and world context buttons.
There could still be some code-wise improvements, like using variable-size
macro for interp3d instead of having interp3d_ex to which you can pass the
interpolation method.
Diffstat (limited to 'intern/cycles/render')
-rw-r--r-- | intern/cycles/render/shader.cpp | 3 | ||||
-rw-r--r-- | intern/cycles/render/shader.h | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/intern/cycles/render/shader.cpp b/intern/cycles/render/shader.cpp index d8925852c21..b960dfa3861 100644 --- a/intern/cycles/render/shader.cpp +++ b/intern/cycles/render/shader.cpp @@ -139,6 +139,7 @@ Shader::Shader() use_transparent_shadow = true; heterogeneous_volume = true; volume_sampling_method = 0; + volume_interpolation_method = 0; has_surface = false; has_surface_transparent = false; @@ -356,6 +357,8 @@ void ShaderManager::device_update_common(Device *device, DeviceScene *dscene, Sc flag |= SD_VOLUME_EQUIANGULAR; if(shader->volume_sampling_method == 2) flag |= SD_VOLUME_MIS; + if(shader->volume_interpolation_method == 1) + flag |= SD_VOLUME_CUBIC; /* regular shader */ shader_flag[i++] = flag; diff --git a/intern/cycles/render/shader.h b/intern/cycles/render/shader.h index 368496fd188..0eef62a1c61 100644 --- a/intern/cycles/render/shader.h +++ b/intern/cycles/render/shader.h @@ -69,6 +69,7 @@ public: bool use_transparent_shadow; bool heterogeneous_volume; int volume_sampling_method; + int volume_interpolation_method; /* synchronization */ bool need_update; |