13 gausstab_sse_ =
nullptr;
52 gausstab_sse_ =
nullptr;
58 const rcti &output_area,
66 r_input_area = output_area;
84 const rcti &input_rect =
input->get_rect();
87 int min_input_coord = -1;
88 int max_input_coord = -1;
90 std::function<int()> get_current_coord;
93 min_input_coord = input_rect.
xmin;
94 max_input_coord = input_rect.
xmax;
95 elem_stride =
input->elem_stride;
96 get_current_coord = [&] {
return it.x; };
99 min_input_coord = input_rect.
ymin;
100 max_input_coord = input_rect.
ymax;
101 elem_stride =
input->row_stride;
102 get_current_coord = [&] {
return it.y; };
106 for (; !it.is_end(); ++it) {
107 const int coord = get_current_coord();
111 float ATTR_ALIGN(16) color_accum[4] = {0.0f, 0.0f, 0.0f, 0.0f};
112 float multiplier_accum = 0.0f;
115 const float *in = it.in(0) + ((
intptr_t)coord_min - coord) * elem_stride;
116 const int in_stride = elem_stride * step;
118 const int gauss_end = gauss_idx + (coord_max - coord_min);
120 __m128 accum_r = _mm_load_ps(color_accum);
121 for (; gauss_idx < gauss_end; in += in_stride, gauss_idx += step) {
122 __m128 reg_a = _mm_load_ps(in);
123 reg_a = _mm_mul_ps(reg_a, gausstab_sse_[gauss_idx]);
124 accum_r = _mm_add_ps(accum_r, reg_a);
125 multiplier_accum +=
gausstab_[gauss_idx];
127 _mm_store_ps(color_accum, accum_r);
129 for (; gauss_idx < gauss_end; in += in_stride, gauss_idx += step) {
130 const float multiplier =
gausstab_[gauss_idx];
132 multiplier_accum += multiplier;
135 mul_v4_v4fl(it.out, color_accum, 1.0f / multiplier_accum);
MINLINE float max_ff(float a, float b)
MINLINE int min_ii(int a, int b)
MINLINE float min_ff(float a, float b)
MINLINE int max_ii(int a, int b)
MINLINE void mul_v4_v4fl(float r[4], const float a[4], float f)
MINLINE void madd_v4_v4fl(float r[4], const float a[4], float f)
#define MAX_GAUSSTAB_RADIUS
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
float * make_gausstab(float rad, int size)
int get_blur_size(eDimension dim) const
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 deinit_execution() override
void init_execution() override
static constexpr int IMAGE_INPUT_INDEX
virtual void init_execution() override
virtual void update_memory_buffer_partial(MemoryBuffer *output, const rcti &area, Span< MemoryBuffer * > inputs) override
virtual void init_data() override
GaussianBlurBaseOperation(eDimension dim)
virtual void deinit_execution() 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.
a MemoryBuffer contains access to the data of a chunk
eExecutionModel execution_model_
DataType
possible data types for sockets
ccl_global KernelShaderEvalInput ccl_global float * output
ccl_global KernelShaderEvalInput * input
void(* MEM_freeN)(void *vmemh)
ccl_device_inline float3 ceil(const float3 &a)
static void area(int d1, int d2, int e1, int e2, float weights[2])
typename BuffersIteratorBuilder< T >::Iterator BuffersIterator
static bNodeSocketTemplate inputs[]