30 this->m_inputImageProgram =
nullptr;
31 this->m_inputKeyProgram =
nullptr;
42 this->m_inputImageProgram =
nullptr;
43 this->m_inputKeyProgram =
nullptr;
54 const float acceptance = this->m_settings->
t1;
55 const float cutoff = this->m_settings->
t2;
56 const float gain = this->m_settings->
fstrength;
58 float x_angle, z_angle,
alpha;
63 this->m_inputImageProgram->
readSampled(inImage,
x,
y, sampler);
73 inImage[1] = (inImage[1] * 2.0f) - 1.0f;
74 inImage[2] = (inImage[2] * 2.0f) - 1.0f;
77 inKey[1] = (inKey[1] * 2.0f) - 1.0f;
78 inKey[2] = (inKey[2] * 2.0f) - 1.0f;
80 theta =
atan2(inKey[2], inKey[1]);
83 x_angle = inImage[1] *
cosf(theta) + inImage[2] *
sinf(theta);
84 z_angle = inImage[2] *
cosf(theta) - inImage[1] *
sinf(theta);
88 kfg = x_angle - (
fabsf(z_angle) /
tanf(acceptance / 2.0f));
91 alpha = 1.0f - (kfg / gain);
101 if (
alpha < inImage[3]) {
_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
void initExecution() override
void deinitExecution() override
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override
void readSampled(float result[4], float x, float y, PixelSampler sampler)
void addInputSocket(DataType datatype, ResizeMode resize_mode=ResizeMode::Center)
void addOutputSocket(DataType datatype)
SocketReader * getInputSocketReader(unsigned int inputSocketindex)
static CCL_NAMESPACE_BEGIN const double alpha
INLINE Rall1d< T, V, S > atan2(const Rall1d< T, V, S > &y, const Rall1d< T, V, S > &x)
ccl_device_inline float beta(float x, float y)