You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

30 lines
828 B

using UnityEngine;
namespace UnityEditor.VFX.Operator
{
[VFXHelpURL("Operator-Saturate")]
[VFXInfo(category = "Math/Clamp")]
class Saturate : VFXOperatorNumericUniform
{
public class InputProperties
{
[Tooltip("The value to be clamped.")]
public float input = 0.0f;
}
protected override sealed string operatorName { get { return "Saturate"; } }
protected override sealed VFXExpression[] BuildExpression(VFXExpression[] inputExpression)
{
return new[] { VFXOperatorUtility.Saturate(inputExpression[0]) };
}
protected override sealed ValidTypeRule typeFilter
{
get
{
return ValidTypeRule.allowEverythingExceptIntegerAndDirection;
}
}
}
}