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>2017-03-21 19:18:25 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2017-04-18 12:20:39 +0300
commitdd356ec08d07ac61c7cf1ddba3772b2df1e176a6 (patch)
tree9c4707b0bcfa8967161e0cc0355095eabb39c442 /intern/cycles/render/nodes.h
parentbb8f7784ce1b159cd47d0f960589a18c90ceb32f (diff)
Cycles: Remove meaningless volume shaders
This is possible to use surface-only nodes and connect them to volume output. If there was something connected to surface output those extra connections will not change anything visually but will force volume features to be included into feature-adaptive kernels. In fact, this exact reason seems to be causing slowdown of Barcelone file comparing AMD OpenCL to NVidia CUDA. Currently only supported by the final F12 renders because of the current design of what gets optimized out when and how feature-adaptive kernel accesses list of required features. Reviewers: dingto, nirved, maiself, lukasstockner97, brecht Reviewed By: brecht Subscribers: bliblubli Differential Revision: https://developer.blender.org/D2569
Diffstat (limited to 'intern/cycles/render/nodes.h')
-rw-r--r--intern/cycles/render/nodes.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/intern/cycles/render/nodes.h b/intern/cycles/render/nodes.h
index a755b653a5b..cf68bd80458 100644
--- a/intern/cycles/render/nodes.h
+++ b/intern/cycles/render/nodes.h
@@ -445,6 +445,7 @@ public:
virtual ClosureType get_closure_type() { return CLOSURE_EMISSION_ID; }
bool has_surface_emission() { return true; }
+ bool has_volume_support() { return true; }
float3 color;
float strength;
@@ -496,6 +497,7 @@ public:
return ShaderNode::get_feature() | NODE_FEATURE_VOLUME;
}
virtual ClosureType get_closure_type() { return closure; }
+ virtual bool has_volume_support() { return true; }
float3 color;
float density;