11 float x = in * slope + offset;
33 const float *in_factor = p.
ins[0];
34 const float *in_color = p.
ins[1];
35 const float fac = std::min(1.0f, in_factor[0]);
36 const float fac_m = 1.0f - fac;
37 p.
out[0] = fac_m * in_color[0] +
39 p.
out[1] = fac_m * in_color[1] +
41 p.
out[2] = fac_m * in_color[2] +
43 p.
out[3] = in_color[3];
void update_memory_buffer_row(PixelCursor &p) override
ColorBalanceASCCDLOperation()
void add_output_socket(DataType datatype)
NodeOperationFlags flags_
void add_input_socket(DataType datatype, ResizeMode resize_mode=ResizeMode::Center)
void set_canvas_input_index(unsigned int index)
set the index of the input socket that will determine the canvas of this operation
ccl_device_inline float2 power(float2 v, float e)
float colorbalance_cdl(float in, float offset, float power, float slope)
Array< const float * > ins