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:
authorThomas Dinges <blender@dingto.org>2015-12-23 23:41:59 +0300
committerThomas Dinges <blender@dingto.org>2015-12-23 23:48:19 +0300
commit059b7a81e2a1ce19ac3c4262bd86eb8d961d5582 (patch)
tree33d19b0d003522deba981332f348f7af7db0ad91 /intern/cycles/render/nodes.h
parent1a2b5d9a8bdb0b48b0cbc421483be8005257f6fa (diff)
Cycles: Implement constant fold for the ConvertNode.
This way socket type conversions (such as color to float, or float to vector) do not stop the folding process. Example: http://www.pasteall.org/pic/show.php?id=96803 (selected nodes are folded).
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 8c5f6651463..5d0a9eb533b 100644
--- a/intern/cycles/render/nodes.h
+++ b/intern/cycles/render/nodes.h
@@ -252,6 +252,8 @@ public:
ConvertNode(ShaderSocketType from, ShaderSocketType to, bool autoconvert = false);
SHADER_NODE_BASE_CLASS(ConvertNode)
+ bool constant_fold(ShaderOutput *socket, float3 *optimized_value);
+
ShaderSocketType from, to;
};