Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/geometry/nodes/node_geo_attribute_mix.cc
| Show First 20 Lines • Show All 86 Lines • ▼ Show 20 Lines | for (const int i : IndexRange(size)) { | ||||
| const float3 b = inputs_b[i]; | const float3 b = inputs_b[i]; | ||||
| ramp_blend(blend_mode, a, factor, b); | ramp_blend(blend_mode, a, factor, b); | ||||
| results.set(i, a); | results.set(i, a); | ||||
| } | } | ||||
| } | } | ||||
| static void do_mix_operation_color4f(const int blend_mode, | static void do_mix_operation_color4f(const int blend_mode, | ||||
| const FloatReadAttribute &factors, | const FloatReadAttribute &factors, | ||||
| const Color4fReadAttribute &inputs_a, | const ColorGeometryReadAttribute &inputs_a, | ||||
| const Color4fReadAttribute &inputs_b, | const ColorGeometryReadAttribute &inputs_b, | ||||
| Color4fWriteAttribute results) | ColorGeometryWriteAttribute results) | ||||
| { | { | ||||
| const int size = results.size(); | const int size = results.size(); | ||||
| for (const int i : IndexRange(size)) { | for (const int i : IndexRange(size)) { | ||||
| const float factor = factors[i]; | const float factor = factors[i]; | ||||
| Color4f a = inputs_a[i]; | ColorGeometry a = inputs_a[i]; | ||||
| const Color4f b = inputs_b[i]; | const ColorGeometry b = inputs_b[i]; | ||||
| ramp_blend(blend_mode, a, factor, b); | ramp_blend(blend_mode, a, factor, b); | ||||
| results.set(i, a); | results.set(i, a); | ||||
| } | } | ||||
| } | } | ||||
| static void do_mix_operation(const CustomDataType result_type, | static void do_mix_operation(const CustomDataType result_type, | ||||
| int blend_mode, | int blend_mode, | ||||
| const FloatReadAttribute &attribute_factor, | const FloatReadAttribute &attribute_factor, | ||||
| ▲ Show 20 Lines • Show All 125 Lines • Show Last 20 Lines | |||||