diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-10-22 18:17:03 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-10-22 18:17:03 +0400 |
commit | 1be189f000242db37c074599e75761669b1afc58 (patch) | |
tree | 6805495ef24b96462a393037a16363c93af06391 /intern/cycles/render/shader.h | |
parent | d2d1b19170c5790b2ef971f5d825d3c36e008513 (diff) |
Cycles: Get rid of hardcoded enum values in the code
Still need to keep enum definition in sync with the python code,
but the code itself is a bit more clear to understand now.
Diffstat (limited to 'intern/cycles/render/shader.h')
-rw-r--r-- | intern/cycles/render/shader.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/intern/cycles/render/shader.h b/intern/cycles/render/shader.h index 0eef62a1c61..b267731abe5 100644 --- a/intern/cycles/render/shader.h +++ b/intern/cycles/render/shader.h @@ -44,6 +44,18 @@ enum ShadingSystem { SHADINGSYSTEM_SVM }; +/* Keep those in sync with the python-defined enum. */ +enum VolumeSampling { + VOLUME_SAMPLING_DISTANCE = 0, + VOLUME_SAMPLING_EQUIANGULAR = 1, + VOLUME_SAMPLING_MULTIPLE_IMPORTANCE = 2, +}; + +enum VolumeInterpolation { + VOLUME_INTERPOLATION_LINEAR = 0, + VOLUME_INTERPOLATION_CUBIC = 1, +}; + /* Shader describing the appearance of a Mesh, Light or Background. * * While there is only a single shader graph, it has three outputs: surface, @@ -68,7 +80,7 @@ public: bool use_mis; bool use_transparent_shadow; bool heterogeneous_volume; - int volume_sampling_method; + VolumeSampling volume_sampling_method; int volume_interpolation_method; /* synchronization */ |