26 return interp(col1, col1 + col2,
t);
31 return interp(col1, col1 * col2,
t);
40 return one - (tm3 +
t * (one - col2)) * (one - col1);
50 outcol.
x *= tm + 2.0f *
t * col2.
x;
52 outcol.
x = 1.0f - (tm + 2.0f *
t * (1.0f - col2.
x)) * (1.0f - outcol.
x);
55 outcol.
y *= tm + 2.0f *
t * col2.
y;
57 outcol.
y = 1.0f - (tm + 2.0f *
t * (1.0f - col2.
y)) * (1.0f - outcol.
y);
60 outcol.
z *= tm + 2.0f *
t * col2.
z;
62 outcol.
z = 1.0f - (tm + 2.0f *
t * (1.0f - col2.
z)) * (1.0f - outcol.
z);
69 return interp(col1, col1 - col2,
t);
79 outcol.
x = tm * outcol.
x +
t * outcol.
x / col2.
x;
81 outcol.
y = tm * outcol.
y +
t * outcol.
y / col2.
y;
83 outcol.
z = tm * outcol.
z +
t * outcol.
z / col2.
z;
107 if (outcol.
x != 0.0f) {
108 float tmp = 1.0f -
t * col2.
x;
111 else if ((tmp = outcol.
x / tmp) > 1.0f)
116 if (outcol.
y != 0.0f) {
117 float tmp = 1.0f -
t * col2.
y;
120 else if ((tmp = outcol.
y / tmp) > 1.0f)
125 if (outcol.
z != 0.0f) {
126 float tmp = 1.0f -
t * col2.
z;
129 else if ((tmp = outcol.
z / tmp) > 1.0f)
140 float tmp, tm = 1.0f -
t;
144 tmp = tm +
t * col2.
x;
147 else if ((tmp = (1.0f - (1.0f - outcol.
x) / tmp)) < 0.0f)
154 tmp = tm +
t * col2.
y;
157 else if ((tmp = (1.0f - (1.0f - outcol.
y) / tmp)) < 0.0f)
164 tmp = tm +
t * col2.
z;
167 else if ((tmp = (1.0f - (1.0f - outcol.
z) / tmp)) < 0.0f)
183 if (hsv2.
y != 0.0f) {
188 outcol =
interp(outcol, tmp,
t);
205 hsv.
y = tm * hsv.
y +
t * hsv2.
y;
219 hsv.
z = tm * hsv.
z +
t * hsv2.
z;
229 if (hsv2.
y != 0.0f) {
235 outcol =
interp(outcol, tmp,
t);
246 float3 scr = one - (one - col2) * (one - col1);
248 return tm * col1 +
t * ((one - col1) * col2 * col1 + col1 * scr);
253 return col1 +
t * (2.0f * col2 +
make_float3(-1.0f, -1.0f, -1.0f));
311 float a = 1.0f + contrast;
312 float b = brightness - contrast * 0.5f;
314 color.
x =
max(
a * color.
x + b, 0.0f);
315 color.
y =
max(
a * color.
y + b, 0.0f);
316 color.
z =
max(
a * color.
z + b, 0.0f);
void rgb_to_hsv(float r, float g, float b, float *r_h, float *r_s, float *r_v)
void hsv_to_rgb(float h, float s, float v, float *r_r, float *r_g, float *r_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 type
_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 GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble w _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat w _GL_VOID_RET _GL_VOID GLint GLint GLint w _GL_VOID_RET _GL_VOID GLshort GLshort GLshort w _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble y2 _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat y2 _GL_VOID_RET _GL_VOID GLint GLint GLint y2 _GL_VOID_RET _GL_VOID GLshort GLshort GLshort y2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLuint *buffer _GL_VOID_RET _GL_VOID GLdouble t _GL_VOID_RET _GL_VOID GLfloat t _GL_VOID_RET _GL_VOID GLint t _GL_VOID_RET _GL_VOID GLshort t _GL_VOID_RET _GL_VOID GLdouble t
#define ccl_device_noinline_cpu
#define ccl_device_inline
#define CCL_NAMESPACE_END
#define make_float3(x, y, z)
ccl_device float3 svm_mix_dodge(float t, float3 col1, float3 col2)
ccl_device_noinline_cpu float3 svm_mix(NodeMix type, float fac, float3 c1, float3 c2)
ccl_device float3 svm_mix_overlay(float t, float3 col1, float3 col2)
ccl_device float3 svm_mix_clamp(float3 col)
ccl_device float3 svm_mix_val(float t, float3 col1, float3 col2)
ccl_device float3 svm_mix_screen(float t, float3 col1, float3 col2)
ccl_device float3 svm_mix_soft(float t, float3 col1, float3 col2)
ccl_device float3 svm_mix_add(float t, float3 col1, float3 col2)
ccl_device float3 svm_mix_dark(float t, float3 col1, float3 col2)
ccl_device float3 svm_mix_diff(float t, float3 col1, float3 col2)
ccl_device float3 svm_mix_mul(float t, float3 col1, float3 col2)
ccl_device float3 svm_mix_sub(float t, float3 col1, float3 col2)
ccl_device float3 svm_mix_light(float t, float3 col1, float3 col2)
ccl_device float3 svm_mix_sat(float t, float3 col1, float3 col2)
ccl_device float3 svm_mix_color(float t, float3 col1, float3 col2)
ccl_device float3 svm_mix_burn(float t, float3 col1, float3 col2)
ccl_device float3 svm_mix_div(float t, float3 col1, float3 col2)
CCL_NAMESPACE_BEGIN ccl_device float3 svm_mix_blend(float t, float3 col1, float3 col2)
ccl_device float3 svm_mix_hue(float t, float3 col1, float3 col2)
ccl_device_inline float3 svm_brightness_contrast(float3 color, float brightness, float contrast)
ccl_device float3 svm_mix_linear(float t, float3 col1, float3 col2)
ccl_device_inline float saturate(float a)
ccl_device_inline float2 interp(const float2 &a, const float2 &b, float t)
ccl_device_inline float2 fabs(const float2 &a)
ccl_device_inline float3 saturate3(float3 a)