10 int table_size = arraylength(ramp);
12 if ((f < 0.0 || f > 1.0) && extrapolate) {
20 t0 = ramp[table_size - 1];
21 dy = t0 - ramp[table_size - 2];
24 return t0 + dy * f * (table_size - 1);
27 f =
clamp(at, 0.0, 1.0) * (table_size - 1);
34 if (i >= table_size) {
37 float t = f - (
float)i;
41 if (interpolate && t > 0.0) {
51 int table_size = arraylength(ramp);
53 if ((f < 0.0 || f > 1.0) && extrapolate) {
61 t0 = ramp[table_size - 1];
62 dy = t0 - ramp[table_size - 2];
65 return t0 + dy * f * (table_size - 1);
68 f =
clamp(at, 0.0, 1.0) * (table_size - 1);
75 if (i >= table_size) {
78 float t = f - (
float)i;
82 if (interpolate && t > 0.0) {
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
draw_view in_light_buf[] float
draw_view push_constant(Type::INT, "radiance_src") .push_constant(Type capture_info_buf storage_buf(1, Qualifier::READ, "ObjectBounds", "bounds_buf[]") .push_constant(Type draw_view int
color rgb_ramp_lookup(color ramp[], float at, int interpolate, int extrapolate)
ccl_device_inline int clamp(int a, int mn, int mx)