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:
authorOmarSquircleArt <omar.squircleart@gmail.com>2019-08-13 23:22:15 +0300
committerOmarSquircleArt <omar.squircleart@gmail.com>2019-08-13 23:22:15 +0300
commit313b78928970a82ab547b07f21f04fc032491ca1 (patch)
tree465c6aec1df0c6b8b0894a238fd4792dd3977dc9 /intern/cycles/render/nodes.h
parent42798a5ca16154c9ecaf5a2359bd0b4fbe9dec94 (diff)
Shading: Add Clamp node to Cycles and EEVEE.
This patch adds a new node that clamps a value between a maximum and a minimum values. Reviewers: brecht Differential Revision: https://developer.blender.org/D5476
Diffstat (limited to 'intern/cycles/render/nodes.h')
-rw-r--r--intern/cycles/render/nodes.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/intern/cycles/render/nodes.h b/intern/cycles/render/nodes.h
index 13c096a00c2..9ac42ffc76c 100644
--- a/intern/cycles/render/nodes.h
+++ b/intern/cycles/render/nodes.h
@@ -1239,6 +1239,17 @@ class MapRangeNode : public ShaderNode {
float value, from_min, from_max, to_min, to_max;
};
+class ClampNode : public ShaderNode {
+ public:
+ SHADER_NODE_CLASS(ClampNode)
+ void constant_fold(const ConstantFolder &folder);
+ virtual int get_group()
+ {
+ return NODE_GROUP_LEVEL_3;
+ }
+ float value, min, max;
+};
+
class MathNode : public ShaderNode {
public:
SHADER_NODE_CLASS(MathNode)