   color.xyz *= scale;
        color.w = %s;
    }
} else if (color.w < %s) {
    half scale = float(%s) / max(0.001, float(color.w));
    color.xyz *= scale;
    color.w = %s;
}
%s = color;
