This patch address: T85368 Fix Map Range Node Clamp Functionality
The clamp was not working correctly because it used hard-coded values.
The clamp will now use input values from the To field.
Differential D10324
Fix T85368:Map Range Node Clamp Functionality Authored by Sam Miller (samuelmiller) on Feb 5 2021, 2:23 PM.
Details This patch address: T85368 Fix Map Range Node Clamp Functionality The clamp was not working correctly because it used hard-coded values. The clamp will now use input values from the To field.
Diff Detail Event TimelineComment Actions This assumes that to_min is less than to_max which may not be the case. See original Map Range patch D5827 to see correct behaviour Result = (type == "range" && (Min > Max)) ? clamp(Value, Max, Min) : clamp(Value, Min, Max); Comment Actions Thank you for the reference. The clamp function does not seem to be available in scope here so I'm using clamp_f. The original CLAMP does not work with the tertiary operation. |