Blender V4.5
shadow_state_template.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/********************************* Shadow Path State **************************/
6
7KERNEL_STRUCT_BEGIN(shadow_path)
8/* Index of a pixel within the device render buffer. */
9KERNEL_STRUCT_MEMBER(shadow_path, uint32_t, render_pixel_index, KERNEL_FEATURE_PATH_TRACING)
10/* Current sample number. */
12/* Random number generator per-pixel info. */
13KERNEL_STRUCT_MEMBER(shadow_path, uint32_t, rng_pixel, KERNEL_FEATURE_PATH_TRACING)
14/* Random number dimension offset. */
15KERNEL_STRUCT_MEMBER(shadow_path, uint16_t, rng_offset, KERNEL_FEATURE_PATH_TRACING)
16/* Current ray bounce depth. */
17KERNEL_STRUCT_MEMBER(shadow_path, uint16_t, bounce, KERNEL_FEATURE_PATH_TRACING)
18/* Current transparent ray bounce depth. */
19KERNEL_STRUCT_MEMBER(shadow_path, uint16_t, transparent_bounce, KERNEL_FEATURE_PATH_TRACING)
20/* Current diffuse ray bounce depth. */
21KERNEL_STRUCT_MEMBER(shadow_path, uint16_t, diffuse_bounce, KERNEL_FEATURE_PATH_TRACING)
22/* Current glossy ray bounce depth. */
23KERNEL_STRUCT_MEMBER(shadow_path, uint16_t, glossy_bounce, KERNEL_FEATURE_PATH_TRACING)
24/* Current transmission ray bounce depth. */
25KERNEL_STRUCT_MEMBER(shadow_path, uint16_t, transmission_bounce, KERNEL_FEATURE_PATH_TRACING)
26/* DeviceKernel bit indicating queued kernels. */
27KERNEL_STRUCT_MEMBER(shadow_path, uint16_t, queued_kernel, KERNEL_FEATURE_PATH_TRACING)
28/* enum PathRayFlag */
30/* Throughput. */
32/* Throughput for shadow pass. */
35 unshadowed_throughput,
37/* Ratio of throughput to distinguish diffuse / glossy / transmission render passes. */
38KERNEL_STRUCT_MEMBER(shadow_path, PackedSpectrum, pass_diffuse_weight, KERNEL_FEATURE_LIGHT_PASSES)
40/* Number of intersections found by ray-tracing.
41 * Note that this is the total number of intersections for the shadow ray.
42 * The number of recorded intersections in the shadow_isect array might be different as it contains
43 * up INTEGRATOR_SHADOW_ISECT_SIZE closest intersections. */
44KERNEL_STRUCT_MEMBER(shadow_path, uint16_t, num_hits, KERNEL_FEATURE_PATH_TRACING)
45/* Light group. */
46KERNEL_STRUCT_MEMBER(shadow_path, uint8_t, lightgroup, KERNEL_FEATURE_PATH_TRACING)
47/* Path guiding. */
49#ifdef __PATH_GUIDING__
50KERNEL_STRUCT_MEMBER(shadow_path,
51 openpgl::cpp::PathSegment *,
52 path_segment,
54#else
56#endif
57KERNEL_STRUCT_MEMBER(shadow_path, float, guiding_mis_weight, KERNEL_FEATURE_PATH_GUIDING)
58KERNEL_STRUCT_END(shadow_path)
59
60/********************************** Shadow Ray *******************************/
61
69KERNEL_STRUCT_MEMBER_PACKED(shadow_ray, int, self_light_object, KERNEL_FEATURE_PATH_TRACING)
70KERNEL_STRUCT_MEMBER_PACKED(shadow_ray, int, self_light_prim, KERNEL_FEATURE_PATH_TRACING)
71KERNEL_STRUCT_END(shadow_ray)
72
73/*********************** Shadow Intersection result **************************/
74
75/* Result from scene intersection.
76 * It contains INTEGRATOR_SHADOW_ISECT_SIZE closest intersections of the shadow ray. */
77KERNEL_STRUCT_BEGIN(shadow_isect)
84KERNEL_STRUCT_END_ARRAY(shadow_isect,
87
88/**************************** Shadow Volume Stack *****************************/
89
90KERNEL_STRUCT_BEGIN(shadow_volume_stack)
91KERNEL_STRUCT_ARRAY_MEMBER(shadow_volume_stack, int, object, KERNEL_FEATURE_VOLUME)
92KERNEL_STRUCT_ARRAY_MEMBER(shadow_volume_stack, int, shader, KERNEL_FEATURE_VOLUME)
93KERNEL_STRUCT_END_ARRAY(shadow_volume_stack,
#define D
ATTR_WARN_UNUSED_RESULT const BMVert * v
unsigned long long int uint64_t
#define KERNEL_FEATURE_VOLUME
#define INTEGRATOR_SHADOW_ISECT_SIZE_CPU
#define KERNEL_FEATURE_PATH_GUIDING
#define INTEGRATOR_SHADOW_ISECT_SIZE_GPU
#define KERNEL_FEATURE_LIGHT_PASSES
#define KERNEL_FEATURE_PATH_TRACING
#define KERNEL_FEATURE_AO_ADDITIVE
#define KERNEL_STRUCT_END(name)
#define KERNEL_STRUCT_BEGIN(name)
#define KERNEL_STRUCT_VOLUME_STACK_SIZE
#define KERNEL_STRUCT_END_ARRAY(name, cpu_array_size, gpu_array_size)
#define KERNEL_STRUCT_MEMBER_PACKED
#define KERNEL_STRUCT_ARRAY_MEMBER(parent_struct, type, name, feature)
#define KERNEL_STRUCT_MEMBER(parent_struct, type, name, feature)
#define KERNEL_STRUCT_BEGIN_PACKED(parent_struct, feature)
packed_float3 PackedSpectrum
uint8_t flag
Definition wm_window.cc:139