[Bf-blender-cvs] [4d11596] master: Fix cycles wrong volume scatter value in light path node.
Brecht Van Lommel
noreply at git.blender.org
Thu Feb 27 21:18:22 CET 2014
Commit: 4d1159627cf1536b36389b0db23bf3d1d8ce206f
Author: Brecht Van Lommel
Date: Thu Feb 27 21:09:27 2014 +0100
https://developer.blender.org/rB4d1159627cf1536b36389b0db23bf3d1d8ce206f
Fix cycles wrong volume scatter value in light path node.
Thanks to Thomas for spotting this.
Differential Revision: https://developer.blender.org/D370
===================================================================
M intern/cycles/kernel/kernel_types.h
M intern/cycles/render/osl.cpp
===================================================================
diff --git a/intern/cycles/kernel/kernel_types.h b/intern/cycles/kernel/kernel_types.h
index 60611d7..fc3e273 100644
--- a/intern/cycles/kernel/kernel_types.h
+++ b/intern/cycles/kernel/kernel_types.h
@@ -220,7 +220,6 @@ enum PathRayFlag {
PATH_RAY_GLOSSY = 16,
PATH_RAY_SINGULAR = 32,
PATH_RAY_TRANSPARENT = 64,
- PATH_RAY_VOLUME_SCATTER = 128,
PATH_RAY_SHADOW_OPAQUE = 128,
PATH_RAY_SHADOW_TRANSPARENT = 256,
@@ -228,6 +227,7 @@ enum PathRayFlag {
PATH_RAY_CURVE = 512, /* visibility flag to define curve segments*/
+ /* note that these can use maximum 12 bits, the other are for layers */
PATH_RAY_ALL_VISIBILITY = (1|2|4|8|16|32|64|128|256|512),
PATH_RAY_MIS_SKIP = 1024,
@@ -235,9 +235,9 @@ enum PathRayFlag {
PATH_RAY_GLOSSY_ANCESTOR = 4096,
PATH_RAY_BSSRDF_ANCESTOR = 8192,
PATH_RAY_SINGLE_PASS_DONE = 16384,
+ PATH_RAY_VOLUME_SCATTER = 32768,
- /* this gives collisions with localview bits
- * see: blender_util.h, grr - Campbell */
+ /* we need layer member flags to be the 20 upper bits */
PATH_RAY_LAYER_SHIFT = (32-20)
};
diff --git a/intern/cycles/render/osl.cpp b/intern/cycles/render/osl.cpp
index e2798f4..aeb7aee 100644
--- a/intern/cycles/render/osl.cpp
+++ b/intern/cycles/render/osl.cpp
@@ -203,7 +203,6 @@ void OSLShaderManager::shading_system_init()
"glossy", /* PATH_RAY_GLOSSY */
"singular", /* PATH_RAY_SINGULAR */
"transparent", /* PATH_RAY_TRANSPARENT */
- "volume_scatter", /* PATH_RAY_VOLUME_SCATTER */
"shadow", /* PATH_RAY_SHADOW_OPAQUE */
"shadow", /* PATH_RAY_SHADOW_TRANSPARENT */
@@ -212,6 +211,8 @@ void OSLShaderManager::shading_system_init()
"diffuse_ancestor", /* PATH_RAY_DIFFUSE_ANCESTOR */
"glossy_ancestor", /* PATH_RAY_GLOSSY_ANCESTOR */
"bssrdf_ancestor", /* PATH_RAY_BSSRDF_ANCESTOR */
+ "__unused__", /* PATH_RAY_SINGLE_PASS_DONE */
+ "volume_scatter", /* PATH_RAY_VOLUME_SCATTER */
};
const int nraytypes = sizeof(raytypes)/sizeof(raytypes[0]);
More information about the Bf-blender-cvs
mailing list