23 bool use_display_sample_scale)
27 int display_pass_stride =
kernel_data.film.display_pass_stride;
28 int display_pass_components =
kernel_data.film.display_pass_components;
30 if (display_pass_components == 4) {
33 float alpha = use_display_sample_scale ?
34 (
kernel_data.film.use_display_pass_alpha ? in.w : 1.0f / sample_scale) :
39 int display_divide_pass_stride =
kernel_data.film.display_divide_pass_stride;
40 if (display_divide_pass_stride != -1) {
45 pass_result =
make_float4(divided.
x, divided.
y, divided.
z, pass_result.w);
50 pass_result *=
make_float4(exposure, exposure, exposure, 1.0f);
53 else if (display_pass_components == 1) {
56 pass_result =
make_float4(*in, *in, *in, 1.0f / sample_scale);
100 int index = offset +
x +
y *
stride;
102 bool use_display_sample_scale = (
kernel_data.film.display_divide_pass_stride == -1);
106 float4 float_result =
film_map(
kg, rgba_in, use_display_sample_scale ? sample_scale : 1.0f);
110 *rgba = uchar_result;
123 int index = offset +
x +
y *
stride;
125 bool use_display_sample_scale = (
kernel_data.film.display_divide_pass_stride == -1);
_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
_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 stride
static CCL_NAMESPACE_BEGIN const double alpha
#define CCL_NAMESPACE_END
#define make_float4(x, y, z, w)
ccl_device void kernel_film_convert_to_byte(KernelGlobals *kg, ccl_global uchar4 *rgba, ccl_global float *buffer, float sample_scale, int x, int y, int offset, int stride)
ccl_device uchar4 film_float_to_byte(float4 color)
ccl_device float4 film_map(KernelGlobals *kg, float4 rgba_in, float scale)
ccl_device void kernel_film_convert_to_half_float(KernelGlobals *kg, ccl_global uchar4 *rgba, ccl_global float *buffer, float sample_scale, int x, int y, int offset, int stride)
CCL_NAMESPACE_BEGIN ccl_device float4 film_get_pass_result(KernelGlobals *kg, ccl_global float *buffer, float sample_scale, int index, bool use_display_sample_scale)
__kernel void ccl_constant KernelData ccl_global void ccl_global char ccl_global int ccl_global char ccl_global unsigned int ccl_global float * buffer
ccl_device float color_linear_to_srgb(float c)
ccl_device_inline void float4_store_half(half *h, float4 f, float scale)
ccl_device_inline float saturate(float a)
ccl_device_inline float3 safe_divide_even_color(float3 a, float3 b)
ccl_device_inline float3 float4_to_float3(const float4 a)