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:
Diffstat (limited to 'intern/cycles/render/shader.h')
-rw-r--r--intern/cycles/render/shader.h24
1 files changed, 23 insertions, 1 deletions
diff --git a/intern/cycles/render/shader.h b/intern/cycles/render/shader.h
index 368496fd188..509c9385e6d 100644
--- a/intern/cycles/render/shader.h
+++ b/intern/cycles/render/shader.h
@@ -18,6 +18,15 @@
#define __SHADER_H__
#ifdef WITH_OSL
+# if defined(_MSC_VER)
+/* Prevent OSL from polluting the context with weird macros from windows.h.
+ * TODO(sergey): Ideally it's only enough to have class/struct declarations in
+ * the header and skip header include here.
+ */
+# define NOGDI
+# define NOMINMAX
+# define WIN32_LEAN_AND_MEAN
+# endif
# include <OSL/oslexec.h>
#endif
@@ -44,6 +53,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 +89,8 @@ public:
bool use_mis;
bool use_transparent_shadow;
bool heterogeneous_volume;
- int volume_sampling_method;
+ VolumeSampling volume_sampling_method;
+ int volume_interpolation_method;
/* synchronization */
bool need_update;