13 input_mask_ =
nullptr;
14 input_value_ =
nullptr;
39 const float dy = (ry - data_->
y) / aspect_ratio_;
40 const float dx = rx - data_->
x;
41 rx = data_->
x + (cosine_ * dx + sine_ * dy);
42 ry = data_->
y + (-sine_ * dx + cosine_ * dy);
47 const float half_height = (data_->
height) / 2.0f;
48 const float half_width = data_->
width / 2.0f;
49 float sx = rx - data_->
x;
51 const float tx = half_width * half_width;
52 float sy = ry - data_->
y;
54 const float ty = half_height * half_height;
56 bool inside = ((
sx / tx) + (
sy / ty)) <= (1.0f + FLT_EPSILON);
61 output[0] =
MAX2(input_mask[0], input_value[0]);
69 output[0] = input_mask[0] - input_value[0];
78 output[0] = input_mask[0] * input_value[0];
86 if (input_mask[0] > 0.0f) {
90 output[0] = input_value[0];
105 switch (mask_type_) {
107 mask_func = [](
const bool is_inside,
const float *
mask,
const float *value) {
112 mask_func = [](
const bool is_inside,
const float *
mask,
const float *value) {
117 mask_func = [](
const bool is_inside,
const float *
mask,
const float *value) {
122 mask_func = [](
const bool is_inside,
const float *
mask,
const float *value) {
124 return mask[0] > 0.0f ? 0.0f : value[0];
140 const float op_last_x =
MAX2(this->
get_width() - 1.0f, FLT_EPSILON);
141 const float op_last_y =
MAX2(this->
get_height() - 1.0f, FLT_EPSILON);
142 const float half_w = data_->
width / 2.0f;
143 const float half_h = data_->
height / 2.0f;
144 const float tx = half_w * half_w;
145 const float ty = half_h * half_h;
147 const float op_ry =
y / op_last_y;
148 const float dy = (op_ry - data_->
y) / aspect_ratio_;
153 const float op_rx =
x / op_last_x;
154 const float dx = op_rx - data_->
x;
155 const float rx = data_->
x + (cosine_ * dx + sine_ * dy);
156 const float ry = data_->
y + (-sine_ * dx + cosine_ * dy);
157 float sx = rx - data_->
x;
159 float sy = ry - data_->
y;
161 const bool inside = ((
sx / tx) + (
sy / ty)) <= (1.0f + FLT_EPSILON);
162 out[0] = mask_func(inside,
mask, value);
173 input_mask_ =
nullptr;
174 input_value_ =
nullptr;
typedef float(TangentPoint)[2]
typedef double(DMatrix)[4][4]
@ CMP_NODE_MASKTYPE_SUBTRACT
@ CMP_NODE_MASKTYPE_MULTIPLY
_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
void init_execution() override
void deinit_execution() override
void execute_pixel_sampled(float output[4], float x, float y, PixelSampler sampler) override
void update_memory_buffer_partial(MemoryBuffer *output, const rcti &area, Span< MemoryBuffer * > inputs) override
a MemoryBuffer contains access to the data of a chunk
float * get_elem(int x, int y)
unsigned int get_height() const
void add_output_socket(DataType datatype)
SocketReader * get_input_socket_reader(unsigned int index)
unsigned int get_width() const
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
static bool is_inside(int x, int y, int cols, int rows)
ccl_gpu_kernel_postfix ccl_global float int int sy
ccl_global KernelShaderEvalInput ccl_global float * output
ccl_gpu_kernel_postfix ccl_global float int sx
ccl_device_inline float4 mask(const int4 &mask, const float4 &a)
INLINE Rall1d< T, V, S > cos(const Rall1d< T, V, S > &arg)
INLINE Rall1d< T, V, S > sin(const Rall1d< T, V, S > &arg)
static void area(int d1, int d2, int e1, int e2, float weights[2])
static const pxr::TfToken out("out", pxr::TfToken::Immortal)
static bNodeSocketTemplate inputs[]