15 const int other_1 = (primary_channel + 1) % 3;
16 const int other_2 = (primary_channel + 2) % 3;
18 const int min_channel = std::min(other_1, other_2);
19 const int max_channel = std::max(other_1, other_2);
21 const float val = pixel_color[max_channel] +
22 screen_balance * (pixel_color[min_channel] - pixel_color[max_channel]);
24 return (pixel_color[primary_channel] - val) *
fabsf(1.0f - val);
static blender::bke::bNodeSocketTemplate inputs[]