Blender V5.0
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/* Current volume bounds ray bounce depth. */
27KERNEL_STRUCT_MEMBER(shadow_path, uint16_t, volume_bounds_bounce, KERNEL_FEATURE_PATH_TRACING)
28/* Current portal ray bounce depth. */
29KERNEL_STRUCT_MEMBER(shadow_path, uint16_t, portal_bounce, KERNEL_FEATURE_NODE_PORTAL)
30/* DeviceKernel bit indicating queued kernels. */
31KERNEL_STRUCT_MEMBER(shadow_path, uint16_t, queued_kernel, KERNEL_FEATURE_PATH_TRACING)
32/* enum PathRayFlag */
34/* Throughput. */
36/* Throughput for shadow pass. */
39 unshadowed_throughput,
41/* Ratio of throughput to distinguish diffuse / glossy / transmission render passes. */
42KERNEL_STRUCT_MEMBER(shadow_path, PackedSpectrum, pass_diffuse_weight, KERNEL_FEATURE_LIGHT_PASSES)
44/* Number of intersections found by ray-tracing.
45 * Note that this is the total number of intersections for the shadow ray.
46 * The number of recorded intersections in the shadow_isect array might be different as it contains
47 * up INTEGRATOR_SHADOW_ISECT_SIZE closest intersections. */
48KERNEL_STRUCT_MEMBER(shadow_path, uint16_t, num_hits, KERNEL_FEATURE_PATH_TRACING)
49/* Light group. */
50KERNEL_STRUCT_MEMBER(shadow_path, uint8_t, lightgroup, KERNEL_FEATURE_PATH_TRACING)
51/* Path guiding. */
53#if defined(__PATH_GUIDING__)
54KERNEL_STRUCT_MEMBER(shadow_path,
55 openpgl::cpp::PathSegment *,
56 path_segment,
58#else
60#endif
61KERNEL_STRUCT_MEMBER(shadow_path, float, guiding_mis_weight, KERNEL_FEATURE_PATH_GUIDING)
62KERNEL_STRUCT_END(shadow_path)
63
64/********************************** Shadow Ray *******************************/
65
73KERNEL_STRUCT_MEMBER_PACKED(shadow_ray, int, self_light_object, KERNEL_FEATURE_PATH_TRACING)
74KERNEL_STRUCT_MEMBER_PACKED(shadow_ray, int, self_light_prim, KERNEL_FEATURE_PATH_TRACING)
75KERNEL_STRUCT_END(shadow_ray)
76
77/*********************** Shadow Intersection result **************************/
78
79/* Result from scene intersection.
80 * It contains INTEGRATOR_SHADOW_ISECT_SIZE closest intersections of the shadow ray. */
81KERNEL_STRUCT_BEGIN(shadow_isect)
88KERNEL_STRUCT_END_ARRAY(shadow_isect,
91
92/**************************** Shadow Volume Stack *****************************/
93
94KERNEL_STRUCT_BEGIN(shadow_volume_stack)
95KERNEL_STRUCT_ARRAY_MEMBER(shadow_volume_stack, int, object, KERNEL_FEATURE_VOLUME)
96KERNEL_STRUCT_ARRAY_MEMBER(shadow_volume_stack, int, shader, KERNEL_FEATURE_VOLUME)
97KERNEL_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 KERNEL_FEATURE_NODE_PORTAL
#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:145