Unity Products:Amplify Shader Editor/Compare With Range

From Amplify Creations Wiki
Jump to navigation Jump to search

Back to Node List

Compare With Range Node

The Compare With Range node compares the value set on its Value and checks if it is within the range defined by both Range Min and Range Max. It will outputs either the result set on True if the value is within the specified range or False if not.

NOTE: Both True and False input ports can have different data types, but a cast will be made for the type with the most amount of channels. The selected type will also define the output type, the amount of channels used on the range comparison operation are given by the Value data type.

Node Parameter Description Default Value
Value Value to be verified if within range. Only visible if the respective input port is not connected. 0
Range Min Minimum range value. Only visible if the respective input port is not connected. 0
Range Max Maximum range value. Only visible if the respective input port is not connected. 0
True Result to be outputted if value is within given range. Only visible if the respective input port is not connected. 0
False Result to be outputted if value is outside given range. Only visible if the respective input port is not connected. 0


Input Port Description Type
A First value of the comparison operation. Float [1]
B Second value of the comparison operation. Float [1]
True Value to be outputted if comparison is successful. Float [1]
False Value to be outputted if comparison fails. Float [1]

  1. ^ Port automatically adapts to all connection types except Matrices and Sampler types.

Back to Node List