82 if ((sx_ == sy_) && (sx_ > 0.0f)) {
111 double q, q2, sc, cf[4], tsM[9], tsu[3], tsv[3];
113 const unsigned int src_width =
src->get_width();
114 const unsigned int src_height =
src->get_height();
115 unsigned int x,
y, src_dim_max;
118 const uint8_t num_channels =
src->get_num_channels();
125 if ((
xy < 1) || (
xy > 3)) {
134 if (src_height < 3) {
144 if (sigma >= 3.556f) {
145 q = 0.9804f * (sigma - 3.556f) + 2.5091f;
148 q = (0.0561f * sigma + 0.5784f) * sigma - 0.2568f;
151 sc = (1.1668 + q) * (3.203729649 + (2.21566 + q) * q);
154 cf[1] = q * (5.788961737 + (6.76492 + 3.0 * q) * q) / sc;
155 cf[2] = -q2 * (3.38246 + 3.0 * q) / sc;
158 cf[0] = 1.0 - cf[1] - cf[2] - cf[3];
167 sc = cf[0] / ((1.0 + cf[1] - cf[2] + cf[3]) * (1.0 - cf[1] - cf[2] - cf[3]) *
168 (1.0 + cf[2] + (cf[1] - cf[3]) * cf[3]));
169 tsM[0] = sc * (-cf[3] * cf[1] + 1.0 - cf[3] * cf[3] - cf[2]);
170 tsM[1] = sc * ((cf[3] + cf[1]) * (cf[2] + cf[3] * cf[1]));
171 tsM[2] = sc * (cf[3] * (cf[1] + cf[3] * cf[2]));
172 tsM[3] = sc * (cf[1] + cf[3] * cf[2]);
173 tsM[4] = sc * (-(cf[2] - 1.0) * (cf[2] + cf[3] * cf[1]));
174 tsM[5] = sc * (-(cf[3] * cf[1] + cf[3] * cf[3] + cf[2] - 1.0) * cf[3]);
175 tsM[6] = sc * (cf[3] * cf[1] + cf[2] + cf[1] * cf[1] - cf[2] * cf[2]);
176 tsM[7] = sc * (cf[1] * cf[2] + cf[3] * cf[2] * cf[2] - cf[1] * cf[3] * cf[3] -
177 cf[3] * cf[3] * cf[3] - cf[3] * cf[2] + cf[3]);
178 tsM[8] = sc * (cf[3] * (cf[1] + cf[3] * cf[2]));
182 W[0] = cf[0] * X[0] + cf[1] * X[0] + cf[2] * X[0] + cf[3] * X[0]; \
183 W[1] = cf[0] * X[1] + cf[1] * W[0] + cf[2] * X[0] + cf[3] * X[0]; \
184 W[2] = cf[0] * X[2] + cf[1] * W[1] + cf[2] * W[0] + cf[3] * X[0]; \
185 for (i = 3; i < L; i++) { \
186 W[i] = cf[0] * X[i] + cf[1] * W[i - 1] + cf[2] * W[i - 2] + cf[3] * W[i - 3]; \
188 tsu[0] = W[L - 1] - X[L - 1]; \
189 tsu[1] = W[L - 2] - X[L - 1]; \
190 tsu[2] = W[L - 3] - X[L - 1]; \
191 tsv[0] = tsM[0] * tsu[0] + tsM[1] * tsu[1] + tsM[2] * tsu[2] + X[L - 1]; \
192 tsv[1] = tsM[3] * tsu[0] + tsM[4] * tsu[1] + tsM[5] * tsu[2] + X[L - 1]; \
193 tsv[2] = tsM[6] * tsu[0] + tsM[7] * tsu[1] + tsM[8] * tsu[2] + X[L - 1]; \
194 Y[L - 1] = cf[0] * W[L - 1] + cf[1] * tsv[0] + cf[2] * tsv[1] + cf[3] * tsv[2]; \
195 Y[L - 2] = cf[0] * W[L - 2] + cf[1] * Y[L - 1] + cf[2] * tsv[0] + cf[3] * tsv[1]; \
196 Y[L - 3] = cf[0] * W[L - 3] + cf[1] * Y[L - 2] + cf[2] * Y[L - 1] + cf[3] * tsv[0]; \
198 for (i = L - 4; i != UINT_MAX; i--) { \
199 Y[i] = cf[0] * W[i] + cf[1] * Y[i + 1] + cf[2] * Y[i + 2] + cf[3] * Y[i + 3]; \
205 src_dim_max =
MAX2(src_width, src_height);
206 X = (
double *)
MEM_callocN(src_dim_max *
sizeof(
double),
"IIR_gauss X buf");
207 Y = (
double *)
MEM_callocN(src_dim_max *
sizeof(
double),
"IIR_gauss Y buf");
208 W = (
double *)
MEM_callocN(src_dim_max *
sizeof(
double),
"IIR_gauss W buf");
211 for (
y = 0;
y < src_height;
y++) {
212 const int yx =
y * src_width;
213 offset = yx * num_channels + chan;
214 for (
x = 0;
x < src_width;
x++) {
219 offset = yx * num_channels + chan;
220 for (
x = 0;
x < src_width;
x++) {
228 const int add = src_width * num_channels;
230 for (
x = 0;
x < src_width;
x++) {
231 offset =
x * num_channels + chan;
232 for (
y = 0;
y < src_height;
y++) {
237 offset =
x * num_channels + chan;
238 for (
y = 0;
y < src_height;
y++) {
252 const rcti &output_area,
274 if (is_full_output) {
282 if ((sx_ == sy_) && (sx_ > 0.0f)) {
300 if (!is_full_output) {
311 inputprogram_ =
nullptr;
365 float *dst =
copy->get_buffer();
366 for (
int i =
copy->get_width() *
copy->get_height(); i != 0;
375 float *dst =
copy->get_buffer();
376 for (
int i =
copy->get_width() *
copy->get_height(); i != 0;
401 if (iirgaus_ ==
nullptr) {
416 for (; !it.is_end(); ++it) {
417 *it.out =
MIN2(*it.in(0), *it.in(1));
421 for (; !it.is_end(); ++it) {
422 *it.out =
MAX2(*it.in(0), *it.in(1));
bool BLI_rcti_compare(const struct rcti *rect_a, const struct rcti *rect_b)
_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
in reality light always falls off quadratically Particle Retrieve the data of the particle that spawned the object for example to give variation to multiple instances of an object Point Retrieve information about points in a point cloud Retrieve the edges of an object as it appears to Cycles topology will always appear triangulated Convert a blackbody temperature to an RGB value Normal Generate a perturbed normal from an RGB normal map image Typically used for faking highly detailed surfaces Generate an OSL shader from a file or text data block Image Sample an image file as a texture Sky Generate a procedural sky texture Noise Generate fractal Perlin noise Wave Generate procedural bands or rings with noise Voronoi Generate Worley noise based on the distance to random points Typically used to generate textures such as or biological cells Brick Generate a procedural texture producing bricks Texture Retrieve multiple types of texture coordinates nTypically used as inputs for texture nodes Vector Convert a or normal between and object coordinate space Combine Create a color from its and value channels Color Retrieve a color or the default fallback if none is specified Separate Split a vector into its and Z components Generates normals with round corners and may slow down renders Vector Displace the surface along an arbitrary direction White Return a random value or color based on an input seed Float Map an input float to a curve and outputs a float value Separate Color
SocketReader * input_program_
virtual void get_area_of_interest(int input_idx, const rcti &output_area, rcti &r_input_area) override
Get input operation area being read by this operation on rendering given output area.
virtual void init_data() override
void init_execution() override
static constexpr int IMAGE_INPUT_INDEX
void get_area_of_interest(int input_idx, const rcti &output_area, rcti &r_input_area) override
Get input operation area being read by this operation on rendering given output area.
void deinit_execution() override
bool determine_depending_area_of_interest(rcti *input, ReadBufferOperation *read_operation, rcti *output) override
void * initialize_tile_data(rcti *rect) override
void init_execution() override
FastGaussianBlurOperation()
void execute_pixel(float output[4], int x, int y, void *data) override
calculate a single pixel
static void IIR_gauss(MemoryBuffer *src, float sigma, unsigned int channel, unsigned int xy)
void init_data() override
void update_memory_buffer_started(MemoryBuffer *output, const rcti &area, Span< MemoryBuffer * > inputs) override
FastGaussianBlurValueOperation()
void deinit_execution() override
void update_memory_buffer_partial(MemoryBuffer *output, const rcti &area, Span< MemoryBuffer * > inputs) override
void init_execution() override
void * initialize_tile_data(rcti *rect) override
void update_memory_buffer_started(MemoryBuffer *output, const rcti &area, Span< MemoryBuffer * > inputs) override
void get_area_of_interest(int input_idx, const rcti &output_area, rcti &r_input_area) override
Get input operation area being read by this operation on rendering given output area.
bool determine_depending_area_of_interest(rcti *input, ReadBufferOperation *read_operation, rcti *output) override
void execute_pixel(float output[4], int x, int y, void *data) override
calculate a single pixel
a MemoryBuffer contains access to the data of a chunk
void read(float *result, int x, int y, MemoryBufferExtend extend_x=MemoryBufferExtend::Clip, MemoryBufferExtend extend_y=MemoryBufferExtend::Clip)
float * get_buffer()
get the data of this MemoryBuffer
NodeOperation contains calculation logic.
unsigned int get_height() const
void add_output_socket(DataType datatype)
SocketReader * get_input_socket_reader(unsigned int index)
unsigned int get_width() const
NodeOperationFlags flags_
NodeOperationOutput * get_output_socket(unsigned int index=0)
const rcti & get_canvas() const
NodeOperation * get_input_operation(int index)
virtual bool determine_depending_area_of_interest(rcti *input, ReadBufferOperation *read_operation, rcti *output)
void add_input_socket(DataType datatype, ResizeMode resize_mode=ResizeMode::Center)
virtual void * initialize_tile_data(rcti *)
SyclQueue void void * src
depth_tx normal_tx diffuse_light_tx specular_light_tx volume_light_tx environment_tx ambient_occlusion_tx aov_value_tx in_weight_img image(1, GPU_R32F, Qualifier::WRITE, ImageType::FLOAT_2D_ARRAY, "out_weight_img") .image(3
DataType
possible data types for sockets
ccl_global float * buffer
ccl_global KernelShaderEvalInput ccl_global float * output
ccl_gpu_kernel_postfix ccl_global float int int int int float bool int offset
ccl_global KernelShaderEvalInput * input
void(* MEM_freeN)(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
bool add(void *owner, const AttributeIDRef &attribute_id, eAttrDomain domain, eCustomDataType data_type, const AttributeInit &initializer)
static void area(int d1, int d2, int e1, int e2, float weights[2])
constexpr int COM_DATA_TYPE_VALUE_CHANNELS
constexpr int COM_DATA_TYPE_COLOR_CHANNELS
typename BuffersIteratorBuilder< T >::Iterator BuffersIterator
static bNodeSocketTemplate inputs[]
static void copy(bNodeTree *dest_ntree, bNode *dest_node, const bNode *src_node)