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 /source/blender/makesdna | |
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 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_node_types.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h index 06ddf08b2ce..e3ea3a5b3f8 100644 --- a/source/blender/makesdna/DNA_node_types.h +++ b/source/blender/makesdna/DNA_node_types.h @@ -1260,6 +1260,20 @@ enum { NODE_VECTOR_MATH_MAXIMUM = 19, }; +/* Clamp node types. */ +enum { + NODE_CLAMP_MINMAX = 0, + NODE_CLAMP_RANGE = 1, +}; + +/* Map range node types. */ +enum { + NODE_MAP_RANGE_LINEAR = 0, + NODE_MAP_RANGE_STEPPED = 1, + NODE_MAP_RANGE_SMOOTHSTEP = 2, + NODE_MAP_RANGE_SMOOTHERSTEP = 3, +}; + /* mix rgb node flags */ #define SHD_MIXRGB_USE_ALPHA 1 #define SHD_MIXRGB_CLAMP 2 |