8 inline float colorbalance_lgg(
float in,
float lift_lgg,
float gamma_inv,
float gain)
54 fac =
MIN2(1.0f, fac);
55 const float mfac = 1.0f - fac;
57 output[0] = mfac * input_color[0] +
59 output[1] = mfac * input_color[1] +
61 output[2] = mfac * input_color[2] +
63 output[3] = input_color[3];
69 const float *in_factor = p.
ins[0];
70 const float *in_color = p.
ins[1];
71 const float fac =
MIN2(1.0f, in_factor[0]);
72 const float fac_m = 1.0f - fac;
73 p.
out[0] = fac_m * in_color[0] +
75 p.
out[1] = fac_m * in_color[1] +
77 p.
out[2] = fac_m * in_color[2] +
79 p.
out[3] = in_color[3];
float srgb_to_linearrgb(float c)
float linearrgb_to_srgb(float c)
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
SocketReader * input_value_operation_
SocketReader * input_color_operation_
void update_memory_buffer_row(PixelCursor &p) override
ColorBalanceLGGOperation()
void execute_pixel_sampled(float output[4], float x, float y, PixelSampler sampler) override
void init_execution() override
void deinit_execution() override
void add_output_socket(DataType datatype)
SocketReader * get_input_socket_reader(unsigned int index)
NodeOperationFlags flags_
void read_sampled(float result[4], float x, float y, PixelSampler sampler)
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
depth_tx sampler(1, ImageType::FLOAT_2D, "combined_tx") .sampler(2
ccl_global KernelShaderEvalInput ccl_global float * output
float colorbalance_lgg(float in, float lift_lgg, float gamma_inv, float gain)
Array< const float * > ins