Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2014-10-22 18:17:03 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2014-10-22 18:17:03 +0400
commit1be189f000242db37c074599e75761669b1afc58 (patch)
tree6805495ef24b96462a393037a16363c93af06391 /intern/cycles/render/shader.h
parentd2d1b19170c5790b2ef971f5d825d3c36e008513 (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.h14
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 */