diff options
author | Jacques Lucke <jacques@blender.org> | 2021-02-08 15:36:51 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2021-02-08 15:36:51 +0300 |
commit | dfa3e0d9b50883ad0c4f2684971e2e791529a2a6 (patch) | |
tree | e93d9cdb5848d3c17619710613bf93fa9e62db52 /source/blender/nodes | |
parent | 2ca3a1d2ae7b2c08d348f49f90b1b697d80f47a9 (diff) | |
parent | bb0b250cbded8bb89d89e67cc2b39826bf3f7fa6 (diff) |
Merge branch 'blender-v2.92-release'
Diffstat (limited to 'source/blender/nodes')
-rw-r--r-- | source/blender/nodes/shader/nodes/node_shader_map_range.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/nodes/shader/nodes/node_shader_map_range.cc b/source/blender/nodes/shader/nodes/node_shader_map_range.cc index 4a6c9ec9a4d..c01e390c513 100644 --- a/source/blender/nodes/shader/nodes/node_shader_map_range.cc +++ b/source/blender/nodes/shader/nodes/node_shader_map_range.cc @@ -122,7 +122,8 @@ class MapRangeFunction : public blender::fn::MultiFunction { if (clamp_) { for (int64_t i : mask) { - CLAMP(results[i], 0.0f, 1.0f); + results[i] = (to_min[i] > to_max[i]) ? clamp_f(results[i], to_max[i], to_min[i]) : + clamp_f(results[i], to_min[i], to_max[i]); } } } |