[Bf-blender-cvs] [71f46bc3679] master: Cycles: Add utility function to distinguish between scatter and absorption volume ID

Sergey Sharybin noreply at git.blender.org
Wed Nov 1 11:12:56 CET 2017


Commit: 71f46bc3679039af358f905abf16b77f0d89bc57
Author: Sergey Sharybin
Date:   Wed Nov 1 11:10:51 2017 +0100
Branches: master
https://developer.blender.org/rB71f46bc3679039af358f905abf16b77f0d89bc57

Cycles: Add utility function to distinguish between scatter and absorption volume ID

===================================================================

M	intern/cycles/kernel/svm/svm_types.h

===================================================================

diff --git a/intern/cycles/kernel/svm/svm_types.h b/intern/cycles/kernel/svm/svm_types.h
index d859cae1708..7fb82bc502a 100644
--- a/intern/cycles/kernel/svm/svm_types.h
+++ b/intern/cycles/kernel/svm/svm_types.h
@@ -476,6 +476,8 @@ typedef enum ClosureType {
 #define CLOSURE_IS_BSDF_OR_BSSRDF(type) (type <= CLOSURE_BSSRDF_BURLEY_ID)
 #define CLOSURE_IS_BSSRDF(type) (type >= CLOSURE_BSSRDF_CUBIC_ID && type <= CLOSURE_BSSRDF_BURLEY_ID)
 #define CLOSURE_IS_VOLUME(type) (type >= CLOSURE_VOLUME_ID && type <= CLOSURE_VOLUME_HENYEY_GREENSTEIN_ID)
+#define CLOSURE_IS_VOLUME_SCATTER(type) (type == CLOSURE_VOLUME_HENYEY_GREENSTEIN_ID)
+#define CLOSURE_IS_VOLUME_ABSORPTION(type) (type == CLOSURE_VOLUME_ABSORPTION_ID)
 #define CLOSURE_IS_EMISSION(type) (type == CLOSURE_EMISSION_ID)
 #define CLOSURE_IS_HOLDOUT(type) (type == CLOSURE_HOLDOUT_ID)
 #define CLOSURE_IS_BACKGROUND(type) (type == CLOSURE_BACKGROUND_ID)



More information about the Bf-blender-cvs mailing list