14 input_image1_program_ =
nullptr;
15 input_image2_program_ =
nullptr;
26 input_image1_program_ =
nullptr;
27 input_image2_program_ =
nullptr;
38 const float tolerance = settings_->
t1;
39 const float falloff = settings_->
t2;
46 difference = (
fabsf(in_color2[0] - in_color1[0]) +
fabsf(in_color2[1] - in_color1[1]) +
47 fabsf(in_color2[2] - in_color1[2]));
50 difference = difference / 3.0f;
53 if (difference <= tolerance) {
57 else if (difference <= falloff + tolerance) {
58 difference = difference - tolerance;
59 alpha = difference / falloff;
61 if (alpha < in_color1[3]) {
79 const float *color1 = it.in(0);
80 const float *color2 = it.in(1);
82 float difference = (
fabsf(color2[0] - color1[0]) +
fabsf(color2[1] - color1[1]) +
83 fabsf(color2[2] - color1[2]));
86 difference = difference / 3.0f;
88 const float tolerance = settings_->
t1;
89 const float falloff = settings_->
t2;
92 if (difference <= tolerance) {
96 else if (difference <= falloff + tolerance) {
97 difference = difference - tolerance;
98 const float alpha = difference / falloff;
100 if (alpha < color1[3]) {
104 it.out[0] = color1[3];
109 it.out[0] = color1[3];
_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
void deinit_execution() override
void update_memory_buffer_partial(MemoryBuffer *output, const rcti &area, Span< MemoryBuffer * > inputs) override
DifferenceMatteOperation()
void init_execution() override
void execute_pixel_sampled(float output[4], float x, float y, PixelSampler sampler) override
a MemoryBuffer contains access to the data of a chunk
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)
depth_tx sampler(1, ImageType::FLOAT_2D, "combined_tx") .sampler(2
ccl_global KernelShaderEvalInput ccl_global float * output
static void area(int d1, int d2, int e1, int e2, float weights[2])
typename BuffersIteratorBuilder< T >::Iterator BuffersIterator
static bNodeSocketTemplate inputs[]