11#ifdef __SHADER_RAYTRACE__
13# ifdef __KERNEL_OPTIX__
14extern "C" __device__ float __direct_callable__svm_node_ao(
27 max_dist =
kernel_data.integrator.ao_bounces_distance;
31 if (max_dist <= 0.0f || num_samples < 1 || sd->
object ==
OBJECT_NONE) {
62 ray.
D =
D.x *
T +
D.y *
B +
D.z *
N;
75 if (!scene_intersect_local(kg, &ray,
NULL, sd->object,
NULL, 0)) {
86 return ((
float)unoccluded) / num_samples;
89template<u
int node_feature_mask,
typename ConstIntegratorGenericState>
90# if defined(__KERNEL_OPTIX__)
97 ConstIntegratorGenericState
state,
102 uint flags, dist_offset, normal_offset, out_ao_offset;
105 uint color_offset, out_color_offset, samples;
115# ifdef __KERNEL_OPTIX__
116 ao = optixDirectCall<float>(0, kg,
state, sd, normal, dist, samples, flags);
118 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 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
additional_info("compositor_sum_squared_difference_float_shared") .push_constant(Type output_img float dot(value.rgb, luminance_coefficients)") .define("LOAD(value)"
const KernelGlobalsCPU *ccl_restrict KernelGlobals
#define ccl_device_inline
#define ccl_device_noinline
#define CCL_NAMESPACE_END
ccl_device_forceinline float differential_zero_compact()
ccl_device_intersect bool scene_intersect_shadow(KernelGlobals kg, ccl_private const Ray *ray, const uint visibility)
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)
ccl_device_inline void path_state_rng_load(ConstIntegratorState state, ccl_private RNGState *rng_state)
ccl_device_inline float2 path_branched_rng_2D(KernelGlobals kg, ccl_private const RNGState *rng_state, const int branch, const int num_branches, const int dimension)
CCL_NAMESPACE_BEGIN ccl_device float2 sample_uniform_disk(const float2 rand)
const IntegratorStateCPU *ccl_restrict ConstIntegratorState
ccl_device_inline void make_orthonormals(const float3 N, ccl_private float3 *a, ccl_private float3 *b)