Blender V5.3
aov.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#pragma once
6
8
10#include "kernel/svm/util.h"
11
13
14ccl_device_inline bool svm_node_aov_check(const uint32_t path_flag,
15 const ccl_global float *render_buffer)
16{
17 const bool is_primary = (path_flag & PATH_RAY_TRANSPARENT_BACKGROUND) &&
18 (!(path_flag & PATH_RAY_SINGLE_PASS_DONE));
19
20 return ((render_buffer != nullptr) && is_primary);
21}
22
23template<uint64_t node_feature_mask, typename ConstIntegratorGenericState>
25 ccl_private ShaderData *sd,
26 ConstIntegratorGenericState state,
27 ccl_private float *ccl_restrict stack,
30{
32 /* Don't write AOV on texture cache miss, we'll try again when the texture exists. */
33 if (sd->runtime_flag & SR_CACHE_MISS) {
34 return;
35 }
36
37 const float3 val = stack_load(stack, node.color);
39 }
40}
41
42template<uint64_t node_feature_mask, typename ConstIntegratorGenericState>
44 ccl_private ShaderData *sd,
45 ConstIntegratorGenericState state,
46 ccl_private float *ccl_restrict stack,
49{
51 /* Don't write AOV on texture cache miss, we'll try again when the texture exists. */
52 if (sd->runtime_flag & SR_CACHE_MISS) {
53 return;
54 }
55
56 const float val = stack_load(stack, node.value);
58 }
59}
CCL_NAMESPACE_BEGIN ccl_device_inline bool svm_node_aov_check(const uint32_t path_flag, const ccl_global float *render_buffer)
Definition aov.h:14
ccl_device void svm_node_aov_color(KernelGlobals kg, ccl_private ShaderData *sd, ConstIntegratorGenericState state, ccl_private float *ccl_restrict stack, const ccl_global SVMNodeAOVColor &ccl_restrict node, ccl_global float *render_buffer)
Definition aov.h:24
ccl_device void svm_node_aov_value(KernelGlobals kg, ccl_private ShaderData *sd, ConstIntegratorGenericState state, ccl_private float *ccl_restrict stack, const ccl_global SVMNodeAOVValue &ccl_restrict node, ccl_global float *render_buffer)
Definition aov.h:43
ccl_device_inline void film_write_aov_pass_color(KernelGlobals kg, ConstIntegratorState state, ccl_global float *ccl_restrict render_buffer, const int aov_id, const float3 color)
Definition aov_passes.h:21
CCL_NAMESPACE_BEGIN ccl_device_inline void film_write_aov_pass_value(KernelGlobals kg, ConstIntegratorState state, ccl_global float *ccl_restrict render_buffer, const int aov_id, const float value)
Definition aov_passes.h:11
ccl_device_inline T stack_load(const ccl_private float *stack, const uint a)
#define ccl_restrict
#define IF_KERNEL_NODES_FEATURE(feature)
#define ccl_private
#define ccl_device_inline
#define ccl_global
#define CCL_NAMESPACE_END
const int state
ccl_gpu_kernel_postfix ccl_global KernelWorkTile const int ccl_global float * render_buffer
@ SR_CACHE_MISS
@ PATH_RAY_SINGLE_PASS_DONE
@ PATH_RAY_TRANSPARENT_BACKGROUND
#define ccl_device