39 void GaussianAlphaXBlurOperation::update_gauss()
64 int bufferwidth = input_buffer->
get_width();
66 int bufferstartx = input_rect.
xmin;
67 int bufferstarty = input_rect.
ymin;
76 int bufferindex = ((xmin - bufferstartx)) + ((ymin - bufferstarty) * bufferwidth);
79 float alpha_accum = 0.0f;
80 float multiplier_accum = 0.0f;
86 float distfacinv_max = 1.0f;
88 for (
int nx = xmin; nx < xmax; nx += step) {
96 alpha_accum += value * multiplier;
97 multiplier_accum += multiplier;
101 if (value > value_max) {
104 if (value > value_max) {
106 distfacinv_max = multiplier;
113 const float value_blur = alpha_accum / multiplier_accum;
114 const float value_final = (value_max * distfacinv_max) + (value_blur * (1.0f - distfacinv_max));
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)
#define MAX_GAUSSTAB_RADIUS
_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
float * make_gausstab(float rad, int size)
float * make_dist_fac_inverse(float rad, int size, int falloff)
BLI_INLINE float finv_test(const float f, const bool test)
virtual void init_execution() override
virtual void deinit_execution() override
bool determine_depending_area_of_interest(rcti *input, ReadBufferOperation *read_operation, rcti *output) override
void init_execution() override
initialize the execution
GaussianAlphaXBlurOperation()
void deinit_execution() override
Deinitialize the execution.
void * initialize_tile_data(rcti *rect) override
void execute_pixel(float output[4], int x, int y, void *data) override
The inner loop of this operation.
a MemoryBuffer contains access to the data of a chunk
const rcti & get_rect() const
get the rect of this MemoryBuffer
const int get_width() const
get the width of this MemoryBuffer
float * get_buffer()
get the data of this MemoryBuffer
NodeOperation contains calculation logic.
unsigned int get_height() const
unsigned int get_width() const
eExecutionModel execution_model_
NodeOperation * get_input_operation(int index)
virtual bool determine_depending_area_of_interest(rcti *input, ReadBufferOperation *read_operation, rcti *output)
virtual void * initialize_tile_data(rcti *)
ccl_global float * buffer
ccl_global KernelShaderEvalInput ccl_global float * output
ccl_global KernelShaderEvalInput * input
void(* MEM_freeN)(void *vmemh)
ccl_device_inline float3 ceil(const float3 &a)