Fix T93941: geometry proximity breaks with high resolution mesh

The calls to `.fill` were overwriting indices that are processed by
other threads.
This commit is contained in:
Jacques Lucke 2021-12-27 17:20:54 +01:00
parent eed45d2a23
commit 644e6c7a3e
Notes: blender-bot 2023-02-14 09:19:09 +01:00
Referenced by issue #93941, Geometry Proximity Node breaks with high resolution mesh in 3.1.0
1 changed files with 3 additions and 3 deletions

View File

@ -177,7 +177,7 @@ class ProximityFunction : public fn::MultiFunction {
* comparison per vertex, so it's likely not worth it. */
MutableSpan<float> distances = params.uninitialized_single_output<float>(2, "Distance");
distances.fill(FLT_MAX);
distances.fill_indices(mask, FLT_MAX);
bool success = false;
if (target_.has_mesh()) {
@ -191,8 +191,8 @@ class ProximityFunction : public fn::MultiFunction {
}
if (!success) {
positions.fill(float3(0));
distances.fill(0.0f);
positions.fill_indices(mask, float3(0));
distances.fill_indices(mask, 0.0f);
return;
}