21 const float radius =
point.w;
23 const float rd2 = 1.0f /
dot(ray_D, ray_D);
25 const float3 c0 = center - ray_P;
26 const float projC0 =
dot(c0, ray_D) * rd2;
27 const float3 perp = c0 - projC0 * ray_D;
28 const float l2 =
dot(perp, perp);
29 const float r2 = radius * radius;
34 const float td =
sqrt((r2 - l2) * rd2);
35 const float t_front = projC0 - td;
36 const bool valid_front = (ray_tmin <= t_front) & (t_front <= ray_tmax);
40 const float t_back = projC0 + td;
41 const bool valid_back = (ray_tmin <= t_back) & (t_back <= ray_tmax);
44 const bool valid_first = valid_front | valid_back;
49 *t = (valid_front) ? t_front : t_back;
74 if (!point_intersect_test(
point, ray_P, ray_D, ray_tmin, ray_tmax, &isect->t)) {
79 isect->object = object;
92 sd->P = ray->P + ray->D * isect->t;
102 motion_point(kg, sd->object, sd->prim, sd->time) :
in reality light always falls off quadratically Particle Retrieve the data of the particle that spawned the object for example to give variation to multiple instances of an object Point Retrieve information about points in a point cloud Retrieve the edges of an object as it appears to Cycles topology will always appear triangulated Convert a blackbody temperature to an RGB value Normal Generate a perturbed normal from an RGB normal map image Typically used for faking highly detailed surfaces Generate an OSL shader from a file or text data block Image Sample an image file as a texture Gabor Generate Gabor noise Gradient Generate interpolated color and intensity values based on the input vector Magic Generate a psychedelic color texture Voronoi Generate Worley noise based on the distance to random points Typically used to generate textures such as or biological cells Brick Generate a procedural texture producing bricks Texture Retrieve multiple types of texture coordinates nTypically used as inputs for texture nodes Vector Convert a point
SIMD_FORCE_INLINE btVector3 & normalize()
Normalize this vector x^2 + y^2 + z^2 = 1.
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 kernel_data_fetch(name, index)
#define ccl_device_forceinline
#define ccl_device_inline
#define CCL_NAMESPACE_END
#define object_position_transform_auto
@ SD_OBJECT_TRANSFORM_APPLIED
VecBase< float, 4 > float4
ccl_device_inline float3 float4_to_float3(const float4 a)