
shader
smoothcolor4(float s = 0 [[int lockgeom = 0]],
float t = 0 [[int lockgeom = 0]],
float s_mid = 0.5,
float s_width = 0.7,
float t_mid = 0.5,
float t_width = 0.7,
float blur = 0.1,
color beginRGB = color(0.6,0.6,0.0),
color endRGB = color(0.6,0.121,0.0),
output color resultRGB = 0)
{
float s_min = s_mid  s_width/2;
float s_max = s_mid + s_width/2;
float t_min = t_mid  t_width/2;
float t_max = t_mid + t_width/2;
float blend = smoothstep(s_min, s_min + blur, s) *
(1  smoothstep(s_max  blur, s_max, s)) *
smoothstep(t_min, t_min + blur, t) *
(1  smoothstep(t_max  blur, t_max, t));
resultRGB = mix(beginRGB, endRGB, blend);
}
