Blender V4.3
read.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2011-2022 Blender Foundation
2 *
3 * SPDX-License-Identifier: Apache-2.0 */
4
5/* Functions to retrieving render passes for display or output. Reading from
6 * the raw render buffer and normalizing based on the number of samples,
7 * computing alpha, compositing shadow catchers, etc. */
8
9#pragma once
10
12
13/* --------------------------------------------------------------------
14 * Common utilities.
15 */
16
17/* The input buffer contains transparency = 1 - alpha, this converts it to
18 * alpha. Also clamp since alpha might end up outside of 0..1 due to Russian
19 * roulette. */
21{
22 return saturatef(1.0f - transparency);
23}
24
26 kfilm_convert,
27 ccl_global const float *ccl_restrict buffer)
28{
29 if (kfilm_convert->pass_sample_count == PASS_UNUSED) {
30 return kfilm_convert->scale;
31 }
32
33 if (kfilm_convert->pass_use_filter) {
34 const uint sample_count = *(
35 (ccl_global const uint *)(buffer + kfilm_convert->pass_sample_count));
36 return 1.0f / sample_count;
37 }
38
39 return 1.0f;
40}
41
43 kfilm_convert,
44 ccl_global const float *ccl_restrict buffer)
45{
46 if (kfilm_convert->pass_sample_count == PASS_UNUSED) {
47 return kfilm_convert->scale_exposure;
48 }
49
50 const float scale = film_get_scale(kfilm_convert, buffer);
51
52 if (kfilm_convert->pass_use_exposure) {
53 return scale * kfilm_convert->exposure;
54 }
55
56 return scale;
57}
58
60 ccl_global const KernelFilmConvert *ccl_restrict kfilm_convert,
61 ccl_global const float *ccl_restrict buffer,
62 ccl_private float *ccl_restrict scale,
63 ccl_private float *ccl_restrict scale_exposure)
64{
65 if (kfilm_convert->pass_sample_count == PASS_UNUSED) {
66 *scale = kfilm_convert->scale;
67 *scale_exposure = kfilm_convert->scale_exposure;
68 return true;
69 }
70
71 const uint sample_count = *(
72 (ccl_global const uint *)(buffer + kfilm_convert->pass_sample_count));
73 if (!sample_count) {
74 *scale = 0.0f;
75 *scale_exposure = 0.0f;
76 return false;
77 }
78
79 if (kfilm_convert->pass_use_filter) {
80 *scale = 1.0f / sample_count;
81 }
82 else {
83 *scale = 1.0f;
84 }
85
86 if (kfilm_convert->pass_use_exposure) {
87 *scale_exposure = *scale * kfilm_convert->exposure;
88 }
89 else {
90 *scale_exposure = *scale;
91 }
92
93 return true;
94}
95
96/* --------------------------------------------------------------------
97 * Float (scalar) passes.
98 */
99
101 kfilm_convert,
102 ccl_global const float *ccl_restrict buffer,
103 ccl_private float *ccl_restrict pixel)
104{
105 kernel_assert(kfilm_convert->num_components >= 1);
106 kernel_assert(kfilm_convert->pass_offset != PASS_UNUSED);
107
108 const float scale_exposure = film_get_scale_exposure(kfilm_convert, buffer);
109
110 ccl_global const float *in = buffer + kfilm_convert->pass_offset;
111 const float f = *in;
112
113 pixel[0] = (f == 0.0f) ? 1e10f : f * scale_exposure;
114}
115
117 kfilm_convert,
118 ccl_global const float *ccl_restrict buffer,
119 ccl_private float *ccl_restrict pixel)
120{
121 kernel_assert(kfilm_convert->num_components >= 1);
122 kernel_assert(kfilm_convert->pass_offset != PASS_UNUSED);
123
124 const float scale_exposure = film_get_scale_exposure(kfilm_convert, buffer);
125
126 ccl_global const float *in = buffer + kfilm_convert->pass_offset;
127 const float f = *in;
128
129 /* Note that we accumulate 1 - mist in the kernel to avoid having to
130 * track the mist values in the integrator state. */
131 pixel[0] = saturatef(1.0f - f * scale_exposure);
132}
133
135 ccl_global const KernelFilmConvert *ccl_restrict kfilm_convert,
136 ccl_global const float *ccl_restrict buffer,
137 ccl_private float *ccl_restrict pixel)
138{
139 /* TODO(sergey): Consider normalizing into the [0..1] range, so that it is possible to see
140 * meaningful value when adaptive sampler stopped rendering image way before the maximum
141 * number of samples was reached (for examples when number of samples is set to 0 in
142 * viewport). */
143
144 kernel_assert(kfilm_convert->num_components >= 1);
145 kernel_assert(kfilm_convert->pass_offset != PASS_UNUSED);
146
147 ccl_global const float *in = buffer + kfilm_convert->pass_offset;
148 const float f = *in;
149
150 pixel[0] = __float_as_uint(f) * kfilm_convert->scale;
151}
152
154 kfilm_convert,
155 ccl_global const float *ccl_restrict buffer,
156 ccl_private float *ccl_restrict pixel)
157{
158 kernel_assert(kfilm_convert->num_components >= 1);
159 kernel_assert(kfilm_convert->pass_offset != PASS_UNUSED);
160
161 const float scale_exposure = film_get_scale_exposure(kfilm_convert, buffer);
162
163 ccl_global const float *in = buffer + kfilm_convert->pass_offset;
164 const float f = *in;
165
166 pixel[0] = f * scale_exposure;
167}
168
169/* --------------------------------------------------------------------
170 * Float 3 passes.
171 */
172
174 ccl_global const KernelFilmConvert *ccl_restrict kfilm_convert,
175 ccl_global const float *ccl_restrict buffer,
176 ccl_private float *ccl_restrict pixel)
177{
178 kernel_assert(kfilm_convert->num_components >= 3);
179 kernel_assert(kfilm_convert->pass_offset != PASS_UNUSED);
180
181 /* Read light pass. */
182 ccl_global const float *in = buffer + kfilm_convert->pass_offset;
183 float3 f = make_float3(in[0], in[1], in[2]);
184
185 /* Optionally add indirect light pass. */
186 if (kfilm_convert->pass_indirect != PASS_UNUSED) {
187 ccl_global const float *in_indirect = buffer + kfilm_convert->pass_indirect;
188 const float3 f_indirect = make_float3(in_indirect[0], in_indirect[1], in_indirect[2]);
189 f += f_indirect;
190 }
191
192 /* Optionally divide out color. */
193 if (kfilm_convert->pass_divide != PASS_UNUSED) {
194 ccl_global const float *in_divide = buffer + kfilm_convert->pass_divide;
195 const float3 f_divide = make_float3(in_divide[0], in_divide[1], in_divide[2]);
196 f = safe_divide_even_color(f, f_divide);
197
198 /* Exposure only, sample scale cancels out. */
199 f *= kfilm_convert->exposure;
200 }
201 else {
202 /* Sample scale and exposure. */
203 f *= film_get_scale_exposure(kfilm_convert, buffer);
204 }
205
206 pixel[0] = f.x;
207 pixel[1] = f.y;
208 pixel[2] = f.z;
209
210 /* Optional alpha channel. */
211 if (kfilm_convert->num_components >= 4) {
212 if (kfilm_convert->pass_combined != PASS_UNUSED) {
213 float scale, scale_exposure;
214 film_get_scale_and_scale_exposure(kfilm_convert, buffer, &scale, &scale_exposure);
215
216 ccl_global const float *in_combined = buffer + kfilm_convert->pass_combined;
217 const float alpha = in_combined[3] * scale;
218 pixel[3] = film_transparency_to_alpha(alpha);
219 }
220 else {
221 pixel[3] = 1.0f;
222 }
223 }
224}
225
227 kfilm_convert,
228 ccl_global const float *ccl_restrict buffer,
229 ccl_private float *ccl_restrict pixel)
230{
231 kernel_assert(kfilm_convert->num_components >= 3);
232 kernel_assert(kfilm_convert->pass_offset != PASS_UNUSED);
233
234 const float scale_exposure = film_get_scale_exposure(kfilm_convert, buffer);
235
236 ccl_global const float *in = buffer + kfilm_convert->pass_offset;
237
238 const float3 f = make_float3(in[0], in[1], in[2]) * scale_exposure;
239
240 pixel[0] = f.x;
241 pixel[1] = f.y;
242 pixel[2] = f.z;
243
244 /* Optional alpha channel. */
245 if (kfilm_convert->num_components >= 4) {
246 if (kfilm_convert->pass_combined != PASS_UNUSED) {
247 float scale, scale_exposure;
248 film_get_scale_and_scale_exposure(kfilm_convert, buffer, &scale, &scale_exposure);
249
250 ccl_global const float *in_combined = buffer + kfilm_convert->pass_combined;
251 const float alpha = in_combined[3] * scale;
252 pixel[3] = film_transparency_to_alpha(alpha);
253 }
254 else {
255 pixel[3] = 1.0f;
256 }
257 }
258}
259
260/* --------------------------------------------------------------------
261 * Float4 passes.
262 */
263
265 kfilm_convert,
266 ccl_global const float *ccl_restrict buffer,
267 ccl_private float *ccl_restrict pixel)
268{
269 kernel_assert(kfilm_convert->num_components == 4);
270 kernel_assert(kfilm_convert->pass_offset != PASS_UNUSED);
271 kernel_assert(kfilm_convert->pass_motion_weight != PASS_UNUSED);
272
273 ccl_global const float *in = buffer + kfilm_convert->pass_offset;
274 ccl_global const float *in_weight = buffer + kfilm_convert->pass_motion_weight;
275
276 const float weight = in_weight[0];
277 const float weight_inv = (weight > 0.0f) ? 1.0f / weight : 0.0f;
278
279 const float4 motion = make_float4(in[0], in[1], in[2], in[3]) * weight_inv;
280
281 pixel[0] = motion.x;
282 pixel[1] = motion.y;
283 pixel[2] = motion.z;
284 pixel[3] = motion.w;
285}
286
288 ccl_global const KernelFilmConvert *ccl_restrict kfilm_convert,
289 ccl_global const float *ccl_restrict buffer,
290 ccl_private float *ccl_restrict pixel)
291{
292 kernel_assert(kfilm_convert->num_components == 4);
293 kernel_assert(kfilm_convert->pass_offset != PASS_UNUSED);
294
295 const float scale = film_get_scale(kfilm_convert, buffer);
296
297 ccl_global const float *in = buffer + kfilm_convert->pass_offset;
298
299 const float4 f = make_float4(in[0], in[1], in[2], in[3]);
300
301 /* x and z contain integer IDs, don't rescale them.
302 * y and w contain matte weights, they get scaled. */
303 pixel[0] = f.x;
304 pixel[1] = f.y * scale;
305 pixel[2] = f.z;
306 pixel[3] = f.w * scale;
307}
308
310 kfilm_convert,
311 ccl_global const float *ccl_restrict buffer,
312 ccl_private float *ccl_restrict pixel)
313{
314 kernel_assert(kfilm_convert->num_components == 4);
315 kernel_assert(kfilm_convert->pass_offset != PASS_UNUSED);
316
317 float scale, scale_exposure;
318 film_get_scale_and_scale_exposure(kfilm_convert, buffer, &scale, &scale_exposure);
319
320 ccl_global const float *in = buffer + kfilm_convert->pass_offset;
321
322 const float3 color = make_float3(in[0], in[1], in[2]) * scale_exposure;
323 const float alpha = in[3] * scale;
324
325 pixel[0] = color.x;
326 pixel[1] = color.y;
327 pixel[2] = color.z;
328 pixel[3] = alpha;
329}
330
332 ccl_global const KernelFilmConvert *ccl_restrict kfilm_convert,
333 ccl_global const float *ccl_restrict buffer,
334 ccl_private float *ccl_restrict pixel)
335{
336 kernel_assert(kfilm_convert->num_components == 4);
337
338 /* 3rd channel contains transparency = 1 - alpha for the combined pass. */
339
340 kernel_assert(kfilm_convert->num_components == 4);
341 kernel_assert(kfilm_convert->pass_offset != PASS_UNUSED);
342
343 float scale, scale_exposure;
344 if (!film_get_scale_and_scale_exposure(kfilm_convert, buffer, &scale, &scale_exposure)) {
345 pixel[0] = 0.0f;
346 pixel[1] = 0.0f;
347 pixel[2] = 0.0f;
348 pixel[3] = 0.0f;
349 return;
350 }
351
352 ccl_global const float *in = buffer + kfilm_convert->pass_offset;
353
354 const float3 color = make_float3(in[0], in[1], in[2]) * scale_exposure;
355 const float alpha = in[3] * scale;
356
357 pixel[0] = color.x;
358 pixel[1] = color.y;
359 pixel[2] = color.z;
360 pixel[3] = film_transparency_to_alpha(alpha);
361}
362
363/* --------------------------------------------------------------------
364 * Shadow catcher.
365 */
366
368 ccl_global const KernelFilmConvert *ccl_restrict kfilm_convert,
369 ccl_global const float *ccl_restrict buffer)
370{
371 kernel_assert(kfilm_convert->pass_shadow_catcher != PASS_UNUSED);
372
373 float scale, scale_exposure;
374 film_get_scale_and_scale_exposure(kfilm_convert, buffer, &scale, &scale_exposure);
375
376 ccl_global const float *in_catcher = buffer + kfilm_convert->pass_shadow_catcher;
377
378 const float3 pixel = make_float3(in_catcher[0], in_catcher[1], in_catcher[2]) * scale_exposure;
379
380 return pixel;
381}
382
384{
385 float x, y, z;
386
387 x = (b.x != 0.0f) ? a.x / b.x : 1.0f;
388 y = (b.y != 0.0f) ? a.y / b.y : 1.0f;
389 z = (b.z != 0.0f) ? a.z / b.z : 1.0f;
390
391 return make_float3(x, y, z);
392}
393
396 ccl_global const float *ccl_restrict buffer)
397{
398 /* For the shadow catcher pass we divide combined pass by the shadow catcher.
399 * Note that denoised shadow catcher pass contains value which only needs ot be scaled (but not
400 * to be calculated as division). */
401
402 if (kfilm_convert->is_denoised) {
403 return film_calculate_shadow_catcher_denoised(kfilm_convert, buffer);
404 }
405
406 kernel_assert(kfilm_convert->pass_shadow_catcher_sample_count != PASS_UNUSED);
407
408 /* If there is no shadow catcher object in this pixel, there is no modification of the light
409 * needed, so return one. */
410 ccl_global const float *in_catcher_sample_count =
411 buffer + kfilm_convert->pass_shadow_catcher_sample_count;
412 const float num_samples = in_catcher_sample_count[0];
413 if (num_samples == 0.0f) {
414 return one_float3();
415 }
416
417 kernel_assert(kfilm_convert->pass_shadow_catcher != PASS_UNUSED);
418 ccl_global const float *in_catcher = buffer + kfilm_convert->pass_shadow_catcher;
419
420 /* NOTE: It is possible that the Shadow Catcher pass is requested as an output without actual
421 * shadow catcher objects in the scene. In this case there will be no auxiliary passes required
422 * for the decision (to save up memory). So delay the asserts to this point so that the number of
423 * samples check handles such configuration. */
424 kernel_assert(kfilm_convert->pass_offset != PASS_UNUSED);
425 kernel_assert(kfilm_convert->pass_combined != PASS_UNUSED);
426 kernel_assert(kfilm_convert->pass_shadow_catcher_matte != PASS_UNUSED);
427
428 ccl_global const float *in_combined = buffer + kfilm_convert->pass_combined;
429 ccl_global const float *in_matte = buffer + kfilm_convert->pass_shadow_catcher_matte;
430
431 /* No scaling needed. The integration works in way that number of samples in the combined and
432 * shadow catcher passes are the same, and exposure is canceled during the division. */
433 const float3 color_catcher = make_float3(in_catcher[0], in_catcher[1], in_catcher[2]);
434 const float3 color_combined = make_float3(in_combined[0], in_combined[1], in_combined[2]);
435 const float3 color_matte = make_float3(in_matte[0], in_matte[1], in_matte[2]);
436
437 /* Need to ignore contribution of the matte object when doing division (otherwise there will be
438 * artifacts caused by anti-aliasing). Since combined pass is used for adaptive sampling and need
439 * to contain matte objects, we subtract matte objects contribution here. This is the same as if
440 * the matte objects were not accumulated to the combined pass. */
441 const float3 combined_no_matte = color_combined - color_matte;
442
443 const float3 shadow_catcher = safe_divide_shadow_catcher(combined_no_matte, color_catcher);
444
445 const float scale = film_get_scale(kfilm_convert, buffer);
446 const float transparency = in_combined[3] * scale;
447 const float alpha = film_transparency_to_alpha(transparency);
448
449 /* Alpha-over on white using transparency of the combined pass. This allows to eliminate
450 * artifacts which are happening on an edge of a shadow catcher when using transparent film.
451 * Note that we treat shadow catcher as straight alpha here because alpha got canceled out
452 * during the division. */
453 const float3 pixel = (1.0f - alpha) * one_float3() + alpha * shadow_catcher;
454
455 return pixel;
456}
457
459 ccl_global const KernelFilmConvert *ccl_restrict kfilm_convert,
460 ccl_global const float *ccl_restrict buffer)
461{
462 /* The approximation of the shadow is 1 - average(shadow_catcher_pass). A better approximation
463 * is possible.
464 *
465 * The matte is alpha-overed onto the shadow (which is kind of alpha-overing shadow onto footage,
466 * and then alpha-overing synthetic objects on top). */
467
468 kernel_assert(kfilm_convert->pass_offset != PASS_UNUSED);
469 kernel_assert(kfilm_convert->pass_shadow_catcher != PASS_UNUSED);
470 kernel_assert(kfilm_convert->pass_shadow_catcher_matte != PASS_UNUSED);
471
472 float scale, scale_exposure;
473 if (!film_get_scale_and_scale_exposure(kfilm_convert, buffer, &scale, &scale_exposure)) {
474 return zero_float4();
475 }
476
477 ccl_global const float *in_matte = buffer + kfilm_convert->pass_shadow_catcher_matte;
478
479 const float3 shadow_catcher = film_calculate_shadow_catcher(kfilm_convert, buffer);
480 const float3 color_matte = make_float3(in_matte[0], in_matte[1], in_matte[2]) * scale_exposure;
481
482 const float transparency = in_matte[3] * scale;
483 const float alpha = saturatef(1.0f - transparency);
484
485 const float alpha_matte = (1.0f - alpha) * (1.0f - saturatef(average(shadow_catcher))) + alpha;
486
487 if (kfilm_convert->use_approximate_shadow_catcher_background) {
488 kernel_assert(kfilm_convert->pass_background != PASS_UNUSED);
489
490 ccl_global const float *in_background = buffer + kfilm_convert->pass_background;
491 const float3 color_background = make_float3(
492 in_background[0], in_background[1], in_background[2]) *
493 scale_exposure;
494 const float3 alpha_over = color_matte + color_background * (1.0f - alpha_matte);
495 return make_float4(alpha_over.x, alpha_over.y, alpha_over.z, 1.0f);
496 }
497
498 return make_float4(color_matte.x, color_matte.y, color_matte.z, alpha_matte);
499}
500
502 ccl_global const KernelFilmConvert *ccl_restrict kfilm_convert,
503 ccl_global const float *ccl_restrict buffer,
504 ccl_private float *ccl_restrict pixel)
505{
506 kernel_assert(kfilm_convert->num_components >= 3);
507
508 const float3 pixel_value = film_calculate_shadow_catcher(kfilm_convert, buffer);
509
510 pixel[0] = pixel_value.x;
511 pixel[1] = pixel_value.y;
512 pixel[2] = pixel_value.z;
513}
514
516 ccl_global const KernelFilmConvert *ccl_restrict kfilm_convert,
517 ccl_global const float *ccl_restrict buffer,
518 ccl_private float *ccl_restrict pixel)
519{
520 kernel_assert(kfilm_convert->num_components == 3 || kfilm_convert->num_components == 4);
521
522 const float4 pixel_value = film_calculate_shadow_catcher_matte_with_shadow(kfilm_convert,
523 buffer);
524
525 pixel[0] = pixel_value.x;
526 pixel[1] = pixel_value.y;
527 pixel[2] = pixel_value.z;
528 if (kfilm_convert->num_components == 4) {
529 pixel[3] = pixel_value.w;
530 }
531}
532
533/* --------------------------------------------------------------------
534 * Compositing and overlays.
535 */
536
538 ccl_global const KernelFilmConvert *ccl_restrict kfilm_convert,
539 ccl_global const float *ccl_restrict buffer,
540 ccl_private float *ccl_restrict pixel)
541{
542 if (kfilm_convert->show_active_pixels && kfilm_convert->pass_adaptive_aux_buffer != PASS_UNUSED)
543 {
544 if (buffer[kfilm_convert->pass_adaptive_aux_buffer + 3] == 0.0f) {
545 const float3 active_rgb = make_float3(1.0f, 0.0f, 0.0f);
546 const float3 mix_rgb = interp(make_float3(pixel[0], pixel[1], pixel[2]), active_rgb, 0.5f);
547 pixel[0] = mix_rgb.x;
548 pixel[1] = mix_rgb.y;
549 pixel[2] = mix_rgb.z;
550 }
551 }
552}
553
unsigned int uint
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Brightness Control the brightness and contrast of the input color Vector Map input vector components with curves Camera Retrieve information about the camera and how it relates to the current shading point s position Clamp a value between a minimum and a maximum Vector Perform vector math operation Invert Invert a color
SIMD_FORCE_INLINE const btScalar & z() const
Return the z value.
Definition btQuadWord.h:117
local_group_size(16, 16) .push_constant(Type b
#define kernel_assert(cond)
#define ccl_restrict
#define ccl_device_forceinline
#define ccl_private
#define ccl_device_inline
#define ccl_global
#define CCL_NAMESPACE_END
ccl_device_forceinline float4 make_float4(const float x, const float y, const float z, const float w)
#define saturatef(x)
ccl_device_forceinline float3 make_float3(const float x, const float y, const float z)
#define __float_as_uint(x)
#define PASS_UNUSED
ccl_device_inline float average(const float2 a)
ccl_device_inline float2 interp(const float2 a, const float2 b, float t)
ccl_device_inline float3 one_float3()
Definition math_float3.h:24
CCL_NAMESPACE_BEGIN ccl_device_inline float4 zero_float4()
Definition math_float4.h:15
ccl_device_inline bool film_get_scale_and_scale_exposure(ccl_global const KernelFilmConvert *ccl_restrict kfilm_convert, ccl_global const float *ccl_restrict buffer, ccl_private float *ccl_restrict scale, ccl_private float *ccl_restrict scale_exposure)
Definition read.h:59
ccl_device_inline void film_get_pass_pixel_combined(ccl_global const KernelFilmConvert *ccl_restrict kfilm_convert, ccl_global const float *ccl_restrict buffer, ccl_private float *ccl_restrict pixel)
Definition read.h:331
CCL_NAMESPACE_BEGIN ccl_device_forceinline float film_transparency_to_alpha(float transparency)
Definition read.h:20
ccl_device_inline void film_get_pass_pixel_depth(ccl_global const KernelFilmConvert *ccl_restrict kfilm_convert, ccl_global const float *ccl_restrict buffer, ccl_private float *ccl_restrict pixel)
Definition read.h:100
ccl_device_inline void film_get_pass_pixel_light_path(ccl_global const KernelFilmConvert *ccl_restrict kfilm_convert, ccl_global const float *ccl_restrict buffer, ccl_private float *ccl_restrict pixel)
Definition read.h:173
ccl_device_inline void film_get_pass_pixel_float3(ccl_global const KernelFilmConvert *ccl_restrict kfilm_convert, ccl_global const float *ccl_restrict buffer, ccl_private float *ccl_restrict pixel)
Definition read.h:226
ccl_device_inline void film_apply_pass_pixel_overlays_rgba(ccl_global const KernelFilmConvert *ccl_restrict kfilm_convert, ccl_global const float *ccl_restrict buffer, ccl_private float *ccl_restrict pixel)
Definition read.h:537
ccl_device_inline float4 film_calculate_shadow_catcher_matte_with_shadow(ccl_global const KernelFilmConvert *ccl_restrict kfilm_convert, ccl_global const float *ccl_restrict buffer)
Definition read.h:458
ccl_device_inline void film_get_pass_pixel_motion(ccl_global const KernelFilmConvert *ccl_restrict kfilm_convert, ccl_global const float *ccl_restrict buffer, ccl_private float *ccl_restrict pixel)
Definition read.h:264
ccl_device_inline void film_get_pass_pixel_float4(ccl_global const KernelFilmConvert *ccl_restrict kfilm_convert, ccl_global const float *ccl_restrict buffer, ccl_private float *ccl_restrict pixel)
Definition read.h:309
ccl_device_inline void film_get_pass_pixel_shadow_catcher_matte_with_shadow(ccl_global const KernelFilmConvert *ccl_restrict kfilm_convert, ccl_global const float *ccl_restrict buffer, ccl_private float *ccl_restrict pixel)
Definition read.h:515
ccl_device_inline float3 safe_divide_shadow_catcher(float3 a, float3 b)
Definition read.h:383
ccl_device_inline float film_get_scale(ccl_global const KernelFilmConvert *ccl_restrict kfilm_convert, ccl_global const float *ccl_restrict buffer)
Definition read.h:25
ccl_device_inline void film_get_pass_pixel_float(ccl_global const KernelFilmConvert *ccl_restrict kfilm_convert, ccl_global const float *ccl_restrict buffer, ccl_private float *ccl_restrict pixel)
Definition read.h:153
ccl_device_inline float film_get_scale_exposure(ccl_global const KernelFilmConvert *ccl_restrict kfilm_convert, ccl_global const float *ccl_restrict buffer)
Definition read.h:42
ccl_device_inline float3 film_calculate_shadow_catcher_denoised(ccl_global const KernelFilmConvert *ccl_restrict kfilm_convert, ccl_global const float *ccl_restrict buffer)
Definition read.h:367
ccl_device_inline void film_get_pass_pixel_sample_count(ccl_global const KernelFilmConvert *ccl_restrict kfilm_convert, ccl_global const float *ccl_restrict buffer, ccl_private float *ccl_restrict pixel)
Definition read.h:134
ccl_device_inline void film_get_pass_pixel_mist(ccl_global const KernelFilmConvert *ccl_restrict kfilm_convert, ccl_global const float *ccl_restrict buffer, ccl_private float *ccl_restrict pixel)
Definition read.h:116
ccl_device_inline float3 film_calculate_shadow_catcher(ccl_global const KernelFilmConvert *ccl_restrict kfilm_convert, ccl_global const float *ccl_restrict buffer)
Definition read.h:395
ccl_device_inline void film_get_pass_pixel_shadow_catcher(ccl_global const KernelFilmConvert *ccl_restrict kfilm_convert, ccl_global const float *ccl_restrict buffer, ccl_private float *ccl_restrict pixel)
Definition read.h:501
ccl_device_inline void film_get_pass_pixel_cryptomatte(ccl_global const KernelFilmConvert *ccl_restrict kfilm_convert, ccl_global const float *ccl_restrict buffer, ccl_private float *ccl_restrict pixel)
Definition read.h:287
float z
Definition sky_float3.h:27
float y
Definition sky_float3.h:27
float x
Definition sky_float3.h:27
VecBase< float, 4 > float4
ccl_device_inline float3 safe_divide_even_color(float3 a, float3 b)
Definition util/math.h:643