Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/geometry/nodes/node_geo_attribute_curve_map.cc
| Show First 20 Lines • Show All 159 Lines • ▼ Show 20 Lines | case CD_PROP_FLOAT3: { | ||||
| for (const int i : range) { | for (const int i : range) { | ||||
| BKE_curvemapping_evaluate3F(cumap, results[i], attribute_in[i]); | BKE_curvemapping_evaluate3F(cumap, results[i], attribute_in[i]); | ||||
| } | } | ||||
| }); | }); | ||||
| break; | break; | ||||
| } | } | ||||
| case CD_PROP_COLOR: { | case CD_PROP_COLOR: { | ||||
| const CurveMapping *cumap = (CurveMapping *)node_storage.curve_rgb; | const CurveMapping *cumap = (CurveMapping *)node_storage.curve_rgb; | ||||
| GVArray_Typed<Color4f> attribute_in = component.attribute_get_for_read<Color4f>( | GVArray_Typed<ColorGeometry4f> attribute_in = | ||||
| input_name, result_domain, Color4f(0.0f, 0.0f, 0.0f, 1.0f)); | component.attribute_get_for_read<ColorGeometry4f>( | ||||
| MutableSpan<Color4f> results = attribute_result.as_span<Color4f>(); | input_name, result_domain, ColorGeometry4f(0.0f, 0.0f, 0.0f, 1.0f)); | ||||
| MutableSpan<ColorGeometry4f> results = attribute_result.as_span<ColorGeometry4f>(); | |||||
| parallel_for(IndexRange(attribute_in.size()), 512, [&](IndexRange range) { | parallel_for(IndexRange(attribute_in.size()), 512, [&](IndexRange range) { | ||||
| for (const int i : range) { | for (const int i : range) { | ||||
| BKE_curvemapping_evaluateRGBF(cumap, results[i], attribute_in[i]); | BKE_curvemapping_evaluateRGBF(cumap, results[i], attribute_in[i]); | ||||
| } | } | ||||
| }); | }); | ||||
| break; | break; | ||||
| } | } | ||||
| default: { | default: { | ||||
| ▲ Show 20 Lines • Show All 53 Lines • Show Last 20 Lines | |||||