ITADN

Please add Max, Min, Clamp and Lerp

#321Openmarianolarre 创建于 2026-03-03
M
marianolarrecommented
I'd love to have these functions. As a shader artist I miss them dearly when creating effects. ``` vec4 max(vec4 _c0, vec4 _c1) { return max(_c0, _c1); } vec4 min(vec4 _c0, vec4 _c1) { return min(_c0, _c1); } vec4 clamp(vec4 _c0, float a=0.0, float b=0.0) { return clamp(_c0, a, b); } vec4 lerp(vec4 _c0, vec4 a, vec4 b) { return a * (1.0 - _c0) + b * _c0; } ``` I managed to add them into Hydro, but Hydra is a bit out of my depth, tho I had to name them maximum, minimum and clampBetween, since it would otherwise overwride other functions.
0 条评论