72 float input_value1[4];
73 float input_value2[4];
78 output[0] = input_value1[0] + input_value2[0];
88 float input_value1[4];
89 float input_value2[4];
94 output[0] = input_value1[0] - input_value2[0];
104 float input_value1[4];
105 float input_value2[4];
110 output[0] = input_value1[0] * input_value2[0];
120 float input_value1[4];
121 float input_value2[4];
126 if (input_value2[0] == 0) {
130 output[0] = input_value1[0] / input_value2[0];
138 for (; !it.is_end(); ++it) {
139 const float divisor = *it.in(1);
149 float input_value1[4];
150 float input_value2[4];
162 for (; !it.is_end(); ++it) {
163 *it.out =
sin(*it.in(0));
173 float input_value1[4];
174 float input_value2[4];
186 for (; !it.is_end(); ++it) {
187 *it.out =
cos(*it.in(0));
197 float input_value1[4];
198 float input_value2[4];
210 for (; !it.is_end(); ++it) {
211 *it.out =
tan(*it.in(0));
221 float input_value1[4];
222 float input_value2[4];
234 for (; !it.is_end(); ++it) {
235 *it.out =
sinh(*it.in(0));
245 float input_value1[4];
246 float input_value2[4];
258 for (; !it.is_end(); ++it) {
259 *it.out =
cosh(*it.in(0));
269 float input_value1[4];
270 float input_value2[4];
282 for (; !it.is_end(); ++it) {
283 *it.out =
tanh(*it.in(0));
293 float input_value1[4];
294 float input_value2[4];
299 if (input_value1[0] <= 1 && input_value1[0] >= -1) {
311 for (; !it.is_end(); ++it) {
312 float value1 = *it.in(0);
322 float input_value1[4];
323 float input_value2[4];
328 if (input_value1[0] <= 1 && input_value1[0] >= -1) {
340 for (; !it.is_end(); ++it) {
341 float value1 = *it.in(0);
351 float input_value1[4];
352 float input_value2[4];
364 for (; !it.is_end(); ++it) {
365 *it.out =
atan(*it.in(0));
375 float input_value1[4];
376 float input_value2[4];
381 if (input_value1[0] >= 0) {
382 output[0] =
pow(input_value1[0], input_value2[0]);
385 float y_mod_1 = fmod(input_value2[0], 1);
387 if (y_mod_1 > 0.999f || y_mod_1 < 0.001f) {
400 for (; !it.is_end(); ++it) {
401 const float value1 = *it.in(0);
402 const float value2 = *it.in(1);
404 *it.out =
pow(value1, value2);
407 const float y_mod_1 = fmod(value2, 1);
410 if (y_mod_1 > 0.999f || y_mod_1 < 0.001f) {
411 *it.out =
pow(value1,
floorf(value2 + 0.5f));
426 float input_value1[4];
427 float input_value2[4];
432 if (input_value1[0] > 0 && input_value2[0] > 0) {
433 output[0] =
log(input_value1[0]) /
log(input_value2[0]);
444 for (; !it.is_end(); ++it) {
445 const float value1 = *it.in(0);
446 const float value2 = *it.in(1);
447 if (value1 > 0 && value2 > 0) {
448 *it.out =
log(value1) /
log(value2);
462 float input_value1[4];
463 float input_value2[4];
468 output[0] =
MIN2(input_value1[0], input_value2[0]);
475 for (; !it.is_end(); ++it) {
476 *it.out =
MIN2(*it.in(0), *it.in(1));
486 float input_value1[4];
487 float input_value2[4];
492 output[0] =
MAX2(input_value1[0], input_value2[0]);
499 for (; !it.is_end(); ++it) {
500 *it.out =
MAX2(*it.in(0), *it.in(1));
510 float input_value1[4];
511 float input_value2[4];
516 output[0] = round(input_value1[0]);
523 for (; !it.is_end(); ++it) {
524 *it.out = round(*it.in(0));
534 float input_value1[4];
535 float input_value2[4];
540 output[0] = input_value1[0] < input_value2[0] ? 1.0f : 0.0f;
550 float input_value1[4];
551 float input_value2[4];
556 output[0] = input_value1[0] > input_value2[0] ? 1.0f : 0.0f;
566 float input_value1[4];
567 float input_value2[4];
572 if (input_value2[0] == 0) {
576 output[0] = fmod(input_value1[0], input_value2[0]);
584 for (; !it.is_end(); ++it) {
585 const float value2 = *it.in(1);
586 *it.out = (value2 == 0) ? 0 : fmod(*it.in(0), value2);
596 float input_value1[4];
607 for (; !it.is_end(); ++it) {
608 *it.out =
fabs(*it.in(0));
618 float input_value1[4];
629 for (; !it.is_end(); ++it) {
640 float input_value1[4];
651 for (; !it.is_end(); ++it) {
662 float input_value1[4];
663 float input_value2[4];
668 output[0] =
atan2(input_value1[0], input_value2[0]);
675 for (; !it.is_end(); ++it) {
676 *it.out =
atan2(*it.in(0), *it.in(1));
686 float input_value1[4];
697 for (; !it.is_end(); ++it) {
698 *it.out =
floor(*it.in(0));
708 float input_value1[4];
719 for (; !it.is_end(); ++it) {
720 *it.out =
ceil(*it.in(0));
730 float input_value1[4];
734 output[0] = input_value1[0] -
floor(input_value1[0]);
741 for (; !it.is_end(); ++it) {
742 const float value = *it.in(0);
752 float input_value1[4];
756 if (input_value1[0] > 0) {
768 for (; !it.is_end(); ++it) {
769 const float value = *it.in(0);
779 float input_value1[4];
783 if (input_value1[0] > 0) {
795 for (; !it.is_end(); ++it) {
796 const float value = *it.in(0);
806 float input_value1[4];
817 for (; !it.is_end(); ++it) {
828 float input_value1[4];
839 for (; !it.is_end(); ++it) {
840 *it.out =
expf(*it.in(0));
850 float input_value1[4];
854 output[0] = (input_value1[0] >= 0.0f) ?
floor(input_value1[0]) :
ceil(input_value1[0]);
861 for (; !it.is_end(); ++it) {
862 const float value = *it.in(0);
863 *it.out = (value >= 0.0f) ?
floor(value) :
ceil(value);
873 float input_value1[4];
874 float input_value2[4];
879 if (input_value1[0] == 0 || input_value2[0] == 0) {
883 output[0] =
floorf(input_value1[0] / input_value2[0]) * input_value2[0];
891 for (; !it.is_end(); ++it) {
892 const float value1 = *it.in(0);
893 const float value2 = *it.in(1);
894 if (value1 == 0 || value2 == 0) {
898 *it.out =
floorf(value1 / value2) * value2;
909 float input_value1[4];
910 float input_value2[4];
911 float input_value3[4];
917 output[0] =
wrapf(input_value1[0], input_value2[0], input_value3[0]);
924 for (; !it.is_end(); ++it) {
925 *it.out =
wrapf(*it.in(0), *it.in(1), *it.in(2));
935 float input_value1[4];
936 float input_value2[4];
948 for (; !it.is_end(); ++it) {
949 *it.out =
pingpongf(*it.in(0), *it.in(1));
959 float input_value1[4];
960 float input_value2[4];
961 float input_value3[4];
967 output[0] = (
fabsf(input_value1[0] - input_value2[0]) <=
MAX2(input_value3[0], 1e-5f)) ? 1.0f :
975 for (; !it.is_end(); ++it) {
976 *it.out = (
fabsf(*it.in(0) - *it.in(1)) <=
MAX2(*it.in(2), 1e-5f)) ? 1.0f : 0.0f;
986 float input_value1[4];
987 float input_value2[4];
988 float input_value3[4];
994 output[0] = input_value1[0] * input_value2[0] + input_value3[0];
1001 for (; !it.is_end(); ++it) {
1002 *it.out = it.in(0)[0] * it.in(1)[0] + it.in(2)[0];
1012 float input_value1[4];
1013 float input_value2[4];
1014 float input_value3[4];
1027 for (; !it.is_end(); ++it) {
1028 *it.out =
smoothminf(*it.in(0), *it.in(1), *it.in(2));
1038 float input_value1[4];
1039 float input_value2[4];
1040 float input_value3[4];
1046 output[0] = -
smoothminf(-input_value1[0], -input_value2[0], input_value3[0]);
1053 for (; !it.is_end(); ++it) {
1054 *it.out = -
smoothminf(-it.in(0)[0], -it.in(1)[0], it.in(2)[0]);
_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
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Bright Control the brightness and contrast of the input color Vector Map an input vectors to used to fine tune the interpolation of the input Camera Retrieve information about the camera and how it relates to the current shading point s position CLAMP
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Bright Control the brightness and contrast of the input color Vector Map an input vectors to used to fine tune the interpolation of the input Camera Retrieve information about the camera and how it relates to the current shading point s position Clamp a value between a minimum and a maximum Vector Perform vector math operation Invert a color
void update_memory_buffer_partial(BuffersIterator< float > &it) override
void execute_pixel_sampled(float output[4], float x, float y, PixelSampler sampler) override
calculate a single pixel
void execute_pixel_sampled(float output[4], float x, float y, PixelSampler sampler) override
calculate a single pixel
void update_memory_buffer_partial(BuffersIterator< float > &it) override
void execute_pixel_sampled(float output[4], float x, float y, PixelSampler sampler) override
calculate a single pixel
void update_memory_buffer_partial(BuffersIterator< float > &it) override
void execute_pixel_sampled(float output[4], float x, float y, PixelSampler sampler) override
calculate a single pixel
void update_memory_buffer_partial(BuffersIterator< float > &it) override
void execute_pixel_sampled(float output[4], float x, float y, PixelSampler sampler) override
calculate a single pixel
void update_memory_buffer_partial(BuffersIterator< float > &it) override
void execute_pixel_sampled(float output[4], float x, float y, PixelSampler sampler) override
calculate a single pixel
SocketReader * input_value2_operation_
SocketReader * input_value1_operation_
void deinit_execution() override
SocketReader * input_value3_operation_
void update_memory_buffer_partial(MemoryBuffer *output, const rcti &area, Span< MemoryBuffer * > inputs) final
void determine_canvas(const rcti &preferred_area, rcti &r_area) override
void init_execution() override
void clamp_if_needed(float color[4])
float clamp_when_enabled(float value)
void update_memory_buffer_partial(BuffersIterator< float > &it) override
void execute_pixel_sampled(float output[4], float x, float y, PixelSampler sampler) override
calculate a single pixel
void update_memory_buffer_partial(BuffersIterator< float > &it) override
void execute_pixel_sampled(float output[4], float x, float y, PixelSampler sampler) override
calculate a single pixel
void execute_pixel_sampled(float output[4], float x, float y, PixelSampler sampler) override
calculate a single pixel
void update_memory_buffer_partial(BuffersIterator< float > &it) override
void execute_pixel_sampled(float output[4], float x, float y, PixelSampler sampler) override
calculate a single pixel
void update_memory_buffer_partial(BuffersIterator< float > &it) override
void update_memory_buffer_partial(BuffersIterator< float > &it) override
void execute_pixel_sampled(float output[4], float x, float y, PixelSampler sampler) override
calculate a single pixel
void execute_pixel_sampled(float output[4], float x, float y, PixelSampler sampler) override
calculate a single pixel
void update_memory_buffer_partial(BuffersIterator< float > &it) override
void update_memory_buffer_partial(BuffersIterator< float > &it) override
void execute_pixel_sampled(float output[4], float x, float y, PixelSampler sampler) override
calculate a single pixel
void update_memory_buffer_partial(BuffersIterator< float > &it) override
void execute_pixel_sampled(float output[4], float x, float y, PixelSampler sampler) override
calculate a single pixel
void execute_pixel_sampled(float output[4], float x, float y, PixelSampler sampler) override
calculate a single pixel
void execute_pixel_sampled(float output[4], float x, float y, PixelSampler sampler) override
calculate a single pixel
void update_memory_buffer_partial(BuffersIterator< float > &it) override
void update_memory_buffer_partial(BuffersIterator< float > &it) override
void execute_pixel_sampled(float output[4], float x, float y, PixelSampler sampler) override
calculate a single pixel
void update_memory_buffer_partial(BuffersIterator< float > &it) override
void execute_pixel_sampled(float output[4], float x, float y, PixelSampler sampler) override
calculate a single pixel
void update_memory_buffer_partial(BuffersIterator< float > &it) override
void execute_pixel_sampled(float output[4], float x, float y, PixelSampler sampler) override
calculate a single pixel
void execute_pixel_sampled(float output[4], float x, float y, PixelSampler sampler) override
calculate a single pixel
void update_memory_buffer_partial(BuffersIterator< float > &it) override
void execute_pixel_sampled(float output[4], float x, float y, PixelSampler sampler) override
calculate a single pixel
void update_memory_buffer_partial(BuffersIterator< float > &it) override
void execute_pixel_sampled(float output[4], float x, float y, PixelSampler sampler) override
calculate a single pixel
void update_memory_buffer_partial(BuffersIterator< float > &it) override
void execute_pixel_sampled(float output[4], float x, float y, PixelSampler sampler) override
calculate a single pixel
void execute_pixel_sampled(float output[4], float x, float y, PixelSampler sampler) override
calculate a single pixel
void update_memory_buffer_partial(BuffersIterator< float > &it) override
void update_memory_buffer_partial(BuffersIterator< float > &it) override
void execute_pixel_sampled(float output[4], float x, float y, PixelSampler sampler) override
calculate a single pixel
void execute_pixel_sampled(float output[4], float x, float y, PixelSampler sampler) override
calculate a single pixel
void execute_pixel_sampled(float output[4], float x, float y, PixelSampler sampler) override
calculate a single pixel
void update_memory_buffer_partial(BuffersIterator< float > &it) override
void execute_pixel_sampled(float output[4], float x, float y, PixelSampler sampler) override
calculate a single pixel
void update_memory_buffer_partial(BuffersIterator< float > &it) override
void execute_pixel_sampled(float output[4], float x, float y, PixelSampler sampler) override
calculate a single pixel
void update_memory_buffer_partial(BuffersIterator< float > &it) override
void execute_pixel_sampled(float output[4], float x, float y, PixelSampler sampler) override
calculate a single pixel
void update_memory_buffer_partial(BuffersIterator< float > &it) override
void update_memory_buffer_partial(BuffersIterator< float > &it) override
void execute_pixel_sampled(float output[4], float x, float y, PixelSampler sampler) override
calculate a single pixel
void execute_pixel_sampled(float output[4], float x, float y, PixelSampler sampler) override
calculate a single pixel
void update_memory_buffer_partial(BuffersIterator< float > &it) override
void update_memory_buffer_partial(BuffersIterator< float > &it) override
void execute_pixel_sampled(float output[4], float x, float y, PixelSampler sampler) override
calculate a single pixel
void update_memory_buffer_partial(BuffersIterator< float > &it) override
void execute_pixel_sampled(float output[4], float x, float y, PixelSampler sampler) override
calculate a single pixel
void execute_pixel_sampled(float output[4], float x, float y, PixelSampler sampler) override
calculate a single pixel
void update_memory_buffer_partial(BuffersIterator< float > &it) override
void execute_pixel_sampled(float output[4], float x, float y, PixelSampler sampler) override
calculate a single pixel
void update_memory_buffer_partial(BuffersIterator< float > &it) override
void execute_pixel_sampled(float output[4], float x, float y, PixelSampler sampler) override
calculate a single pixel
void update_memory_buffer_partial(BuffersIterator< float > &it) override
void execute_pixel_sampled(float output[4], float x, float y, PixelSampler sampler) override
calculate a single pixel
void execute_pixel_sampled(float output[4], float x, float y, PixelSampler sampler) override
calculate a single pixel
void update_memory_buffer_partial(BuffersIterator< float > &it) override
void execute_pixel_sampled(float output[4], float x, float y, PixelSampler sampler) override
calculate a single pixel
void update_memory_buffer_partial(BuffersIterator< float > &it) 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_
NodeOperationInput * get_input_socket(unsigned int index)
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
virtual void determine_canvas(const rcti &preferred_area, rcti &r_area)
depth_tx sampler(1, ImageType::FLOAT_2D, "combined_tx") .sampler(2
ccl_global KernelShaderEvalInput ccl_global float * output
MINLINE float smoothminf(float a, float b, float c)
MINLINE float pingpongf(float value, float scale)
MINLINE float compatible_signf(float f)
MINLINE float wrapf(float value, float max, float min)
ccl_device_inline float2 fabs(const float2 &a)
ccl_device_inline float3 ceil(const float3 &a)
ccl_device_inline float3 pow(float3 v, float e)
ccl_device_inline float3 log(float3 v)
INLINE Rall1d< T, V, S > sinh(const Rall1d< T, V, S > &arg)
INLINE Rall1d< T, V, S > cos(const Rall1d< T, V, S > &arg)
INLINE Rall1d< T, V, S > cosh(const Rall1d< T, V, S > &arg)
INLINE Rall1d< T, V, S > tanh(const Rall1d< T, V, S > &arg)
INLINE Rall1d< T, V, S > asin(const Rall1d< T, V, S > &x)
INLINE Rall1d< T, V, S > atan(const Rall1d< T, V, S > &x)
INLINE Rall1d< T, V, S > acos(const Rall1d< T, V, S > &x)
INLINE Rall1d< T, V, S > sin(const Rall1d< T, V, S > &arg)
INLINE Rall1d< T, V, S > tan(const Rall1d< T, V, S > &arg)
INLINE Rall1d< T, V, S > atan2(const Rall1d< T, V, S > &y, const Rall1d< T, V, S > &x)
static void area(int d1, int d2, int e1, int e2, float weights[2])
typename BuffersIteratorBuilder< T >::Iterator BuffersIterator
constexpr rcti COM_AREA_NONE
static bNodeSocketTemplate inputs[]