10 #ifdef __SHADER_RAYTRACE__
12 # ifdef __KERNEL_OPTIX__
13 extern "C" __device__ float __direct_callable__svm_node_ao(
26 max_dist =
kernel_data.integrator.ao_bounces_distance;
30 if (max_dist <= 0.0f || num_samples < 1 || sd->
object ==
OBJECT_NONE) {
61 ray.
D =
D.x *
T +
D.y *
B +
D.z *
N;
73 if (!scene_intersect_local(kg, &ray,
NULL, sd->object,
NULL, 0)) {
88 template<u
int node_feature_mask,
typename ConstIntegratorGenericState>
89 # if defined(__KERNEL_OPTIX__)
96 ConstIntegratorGenericState
state,
101 uint flags, dist_offset, normal_offset, out_ao_offset;
104 uint color_offset, out_color_offset, samples;
114 # ifdef __KERNEL_OPTIX__
115 ao = optixDirectCall<float>(0, kg,
state, sd,
normal, dist, samples, flags);
117 ao = svm_ao(kg,
state, sd,
normal, dist, samples, flags);
MINLINE float safe_sqrtf(float a)
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 Bright Control the brightness and contrast of the input color Vector Map an input vectors to used to fine tune the interpolation of the input 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 a color
#define ccl_device_inline
#define ccl_device_noinline
#define CCL_NAMESPACE_END
const KernelGlobalsCPU *ccl_restrict KernelGlobals
ccl_device_forceinline float differential_zero_compact()
IconTextureDrawCall normal
ccl_device_intersect bool scene_intersect(KernelGlobals kg, ccl_private const Ray *ray, const uint visibility, ccl_private Intersection *isect)
ccl_gpu_kernel_postfix ccl_global float int int int int ccl_global const float int int int int int int int int int int int int num_samples
ccl_device_inline void stack_store_float3(ccl_private float *stack, uint a, float3 f)
CCL_NAMESPACE_BEGIN ccl_device_inline float3 stack_load_float3(ccl_private float *stack, uint a)
ccl_device_forceinline void svm_unpack_node_uchar3(uint i, ccl_private uint *x, ccl_private uint *y, ccl_private uint *z)
ccl_device_inline float stack_load_float_default(ccl_private float *stack, uint a, uint value)
ccl_device_inline void stack_store_float(ccl_private float *stack, uint a, float f)
ccl_device_forceinline void svm_unpack_node_uchar4(uint i, ccl_private uint *x, ccl_private uint *y, ccl_private uint *z, ccl_private uint *w)
ccl_device_inline bool stack_valid(uint a)
#define IF_KERNEL_NODES_FEATURE(feature)
T dot(const vec_base< T, Size > &a, const vec_base< T, Size > &b)
ccl_device_inline void path_branched_rng_2D(KernelGlobals kg, ccl_private const RNGState *rng_state, int branch, int num_branches, int dimension, ccl_private float *fx, ccl_private float *fy)
ccl_device_inline void path_state_rng_load(ConstIntegratorState state, ccl_private RNGState *rng_state)
ccl_device float2 concentric_sample_disk(float u1, float u2)
const IntegratorStateCPU *ccl_restrict ConstIntegratorState
ccl_device_inline void make_orthonormals(const float3 N, ccl_private float3 *a, ccl_private float3 *b)
BLI_INLINE float D(const float *data, const int res[3], int x, int y, int z)