9 : buffer_(output_buffer),
10 default_color_(default_color),
11 total_weights_(output_buffer.
size(), 0.0f)
22 output_color.
r +=
color.r * weight;
23 output_color.
g +=
color.g * weight;
24 output_color.
b +=
color.b * weight;
25 output_color.
a +=
color.a * weight;
26 total_weights_[index] += weight;
31 for (
const int64_t i : buffer_.index_range()) {
32 const float weight = total_weights_[i];
35 const float weight_inv = 1.0f / weight;
36 output_color.
r *= weight_inv;
37 output_color.
g *= weight_inv;
38 output_color.
b *= weight_inv;
39 output_color.
a *= weight_inv;
42 output_color = default_color_;
50 default_color_(default_color),
59 float4 &accum_value = accumulation_buffer_[index];
60 accum_value[0] +=
color.r * weight;
61 accum_value[1] +=
color.g * weight;
62 accum_value[2] +=
color.b * weight;
63 accum_value[3] +=
color.a * weight;
64 total_weights_[index] += weight;
69 for (
const int64_t i : buffer_.index_range()) {
70 const float weight = total_weights_[i];
71 const float4 &accum_value = accumulation_buffer_[i];
74 const float weight_inv = 1.0f / weight;
75 output_color.
r = accum_value[0] * weight_inv;
76 output_color.
g = accum_value[1] * weight_inv;
77 output_color.
b = accum_value[2] * weight_inv;
78 output_color.
a = accum_value[3] * weight_inv;
81 output_color = default_color_;
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
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
ColorGeometry4bMixer(MutableSpan< ColorGeometry4b > buffer, ColorGeometry4b default_color=ColorGeometry4b(0, 0, 0, 255))
void mix_in(int64_t index, const ColorGeometry4b &color, float weight=1.0f)
ColorGeometry4fMixer(MutableSpan< ColorGeometry4f > buffer, ColorGeometry4f default_color=ColorGeometry4f(0.0f, 0.0f, 0.0f, 1.0f))
void mix_in(int64_t index, const ColorGeometry4f &color, float weight=1.0f)
ccl_global float * buffer
ColorSceneLinear4f< eAlpha::Premultiplied > ColorGeometry4f