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/nodes.h')
-rw-r--r--intern/cycles/render/nodes.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/intern/cycles/render/nodes.h b/intern/cycles/render/nodes.h
index 54a5220dcef..5df34a84559 100644
--- a/intern/cycles/render/nodes.h
+++ b/intern/cycles/render/nodes.h
@@ -387,6 +387,7 @@ public:
bool has_spatial_varying() { return true; }
void compile(SVMCompiler& compiler, ShaderInput *param1, ShaderInput *param2, ShaderInput *param3 = NULL, ShaderInput *param4 = NULL);
+ virtual ClosureType get_closure_type() { return closure; }
ClosureType closure;
bool scattering;
@@ -484,6 +485,7 @@ class EmissionNode : public ShaderNode {
public:
SHADER_NODE_CLASS(EmissionNode)
bool constant_fold(ShaderGraph *graph, ShaderOutput *socket, float3 *optimized_value);
+ virtual ClosureType get_closure_type() { return CLOSURE_EMISSION_ID; }
bool has_surface_emission() { return true; }
};
@@ -492,12 +494,14 @@ class BackgroundNode : public ShaderNode {
public:
SHADER_NODE_CLASS(BackgroundNode)
bool constant_fold(ShaderGraph *graph, ShaderOutput *socket, float3 *optimized_value);
+ virtual ClosureType get_closure_type() { return CLOSURE_BACKGROUND_ID; }
};
class HoldoutNode : public ShaderNode {
public:
SHADER_NODE_CLASS(HoldoutNode)
virtual int get_group() { return NODE_GROUP_LEVEL_1; }
+ virtual ClosureType get_closure_type() { return CLOSURE_HOLDOUT_ID; }
};
class AmbientOcclusionNode : public ShaderNode {
@@ -506,6 +510,7 @@ public:
bool has_spatial_varying() { return true; }
virtual int get_group() { return NODE_GROUP_LEVEL_1; }
+ virtual ClosureType get_closure_type() { return CLOSURE_AMBIENT_OCCLUSION_ID; }
};
class VolumeNode : public ShaderNode {
@@ -517,6 +522,7 @@ public:
virtual int get_feature() {
return ShaderNode::get_feature() | NODE_FEATURE_VOLUME;
}
+ virtual ClosureType get_closure_type() { return closure; }
ClosureType closure;