/
redgpu
/
ezEngine
Обзор
Документация
Войти
/
redgpu
/
ezEngine
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
dev
Data/Tools/ezEditor/VisualShader/Math_Clamping.ddl
113 строк
3 KB
Sanakan8472
VSE: Linearized code generation and type system improvements (#1806)
02 фев 2026, 22:06
Не верифицирован
02 фев 2026, 22:06
77419f2
Код
Авторство
О чём код?
Node %Max { string %Category { "Math/Clamping" } string %Color { "Yellow" } string %Docs { "Outputs the larger value for each component of the input." } string %Title { "Max ({$in0}, {$in1})" } InputPin %a { string %Type { "auto" } bool %Expose { true } string %DefaultValue { "0" } } InputPin %b { string %Type { "auto" } bool %Expose { true } string %DefaultValue { "0" } } OutputPin %result { string %Type { "auto" } string %Inline { "max(ToBiggerType($in0, $in1), ToBiggerType($in1, $in0))" } string %Tooltip { "The larger of the two input values (component-wise)." } } } Node %Min { string %Category { "Math/Clamping" } string %Color { "Yellow" } string %Docs { "Outputs the smaller value for each component of the input." } string %Title { "Min ({$in0}, {$in1})" } InputPin %a { string %Type { "auto" } bool %Expose { true } string %DefaultValue { "0" } } InputPin %b { string %Type { "auto" } bool %Expose { true } string %DefaultValue { "0" } } OutputPin %result { string %Type { "auto" } string %Inline { "min(ToBiggerType($in0, $in1), ToBiggerType($in1, $in0))" } string %Tooltip { "The smaller of the two input values (component-wise)." } } } Node %Saturate { string %Category { "Math/Clamping" } string %Color { "Yellow" } string %Docs { "Clamps each component of the input to the range zero to one." } InputPin %a { string %Type { "auto" } } OutputPin %result { string %Type { "auto" } string %Inline { "saturate($in0)" } string %Tooltip { "Clamps the input to the range [0, 1] (component-wise)." } } } Node %Clamp { string %Category { "Math/Clamping" } string %Color { "Yellow" } string %Docs { "Clamps each component of the input to the given minimum and maximum range." } string %Title { "Clamp({$in1}, {$in2})" } InputPin %x { string %Type { "auto" } string %Tooltip { "The value to clamp." } } InputPin %min { string %Type { "auto" } bool %Expose { true } string %DefaultValue { "0" } string %Tooltip { "The minimum value to clamp against." } } InputPin %max { string %Type { "auto" } bool %Expose { true } string %DefaultValue { "1" } string %Tooltip { "The maximum value to clamp against." } } OutputPin %result { string %Type { "auto" } string %Inline { "clamp($in0, ToSameType($in1, $in0), ToSameType($in2, $in0))" } string %Tooltip { "All output values will be clamped to be between Min and Max." } } }