diff options
author | Charlie Jolly <charlie> | 2019-12-07 15:35:07 +0300 |
---|---|---|
committer | Charlie Jolly <mistajolly@gmail.com> | 2019-12-07 15:52:42 +0300 |
commit | 958d0d4236b1cfa600a7f36f6bdc51fdd0d98a97 (patch) | |
tree | 567a1e3209e6302dd784c054b858a8b5fb92bc9f /intern/cycles/render/nodes.h | |
parent | 0406eb110332a863811d7fb6228f9a7ca514e022 (diff) |
Shader Nodes: Add Interpolation modes to Map Range node
Modes: Linear interpolation (default), stepped linear, smoothstep and smootherstep.
This also includes an additional option for the **Clamp node** to switch between **Min Max** (default) and **Range** mode.
This was needed to allow clamping when **To Max** is less than **To Min**.
Reviewed By: JacquesLucke, brecht
Differential Revision: https://developer.blender.org/D5827
Diffstat (limited to 'intern/cycles/render/nodes.h')
-rw-r--r-- | intern/cycles/render/nodes.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/intern/cycles/render/nodes.h b/intern/cycles/render/nodes.h index b8f1328f4b9..ae762f3db1c 100644 --- a/intern/cycles/render/nodes.h +++ b/intern/cycles/render/nodes.h @@ -1290,14 +1290,14 @@ class BlackbodyNode : public ShaderNode { class MapRangeNode : public ShaderNode { public: SHADER_NODE_CLASS(MapRangeNode) - void constant_fold(const ConstantFolder &folder); virtual int get_group() { return NODE_GROUP_LEVEL_3; } void expand(ShaderGraph *graph); - float value, from_min, from_max, to_min, to_max; + float value, from_min, from_max, to_min, to_max, steps; + NodeMapRangeType type; bool clamp; }; @@ -1310,6 +1310,7 @@ class ClampNode : public ShaderNode { return NODE_GROUP_LEVEL_3; } float value, min, max; + NodeClampType type; }; class MathNode : public ShaderNode { |