61 for (const int64_t y : sub_y_range) {
62 for (const int64_t x : IndexRange(size.x)) {
63 float accumulated_weight = 0.0f;
64 float4 accumulated_color = float4(0.0f);
66 float4 center_color = float4(input.get_elem(x, y));
67 float center_weight = *weights.get_elem(0, 0);
68 accumulated_color += center_color * center_weight;
69 accumulated_weight += center_weight;
72 *(is_vertical ? radius_buffer.get_elem(y, x) : radius_buffer.get_elem(x, y)));
74 for (int i = 1; i <= radius; i++) {
75 float weight = sample_weight(weights, (float(i) + 0.5f) / float(radius + 1));
76 accumulated_color += float4(input.get_elem_clamped(x + i, y)) * weight;
77 accumulated_color += float4(input.get_elem_clamped(x - i, y)) * weight;
78 accumulated_weight += weight * 2.0f;
81 const float4 final_color = accumulated_color / accumulated_weight;
82 copy_v4_v4(output.get_elem(y, x), final_color);
static T sum(const btAlignedObjectArray< T > &items)