diff options
author | OmarSquircleArt <omar.squircleart@gmail.com> | 2019-08-13 23:22:15 +0300 |
---|---|---|
committer | OmarSquircleArt <omar.squircleart@gmail.com> | 2019-08-13 23:22:15 +0300 |
commit | 313b78928970a82ab547b07f21f04fc032491ca1 (patch) | |
tree | 465c6aec1df0c6b8b0894a238fd4792dd3977dc9 /intern/cycles/blender/blender_shader.cpp | |
parent | 42798a5ca16154c9ecaf5a2359bd0b4fbe9dec94 (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/blender/blender_shader.cpp')
-rw-r--r-- | intern/cycles/blender/blender_shader.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/intern/cycles/blender/blender_shader.cpp b/intern/cycles/blender/blender_shader.cpp index dc0563c3bb8..b1c61c2fa8c 100644 --- a/intern/cycles/blender/blender_shader.cpp +++ b/intern/cycles/blender/blender_shader.cpp @@ -318,6 +318,9 @@ static ShaderNode *add_node(Scene *scene, else if (b_node.is_a(&RNA_ShaderNodeMapRange)) { node = new MapRangeNode(); } + else if (b_node.is_a(&RNA_ShaderNodeClamp)) { + node = new ClampNode(); + } else if (b_node.is_a(&RNA_ShaderNodeMath)) { BL::ShaderNodeMath b_math_node(b_node); MathNode *math = new MathNode(); |