Mesh: Reduce custom normal calculation memory usage #107592

Merged
Hans Goudey merged 32 commits from HooglyBoogly/blender:corner-normals-refactor-storage into main 2023-05-10 14:41:16 +02:00
1 changed files with 33 additions and 32 deletions
Showing only changes of commit 6c3883a26c - Show all commits

View File

@ -1642,10 +1642,12 @@ static void mesh_normals_loop_custom_set(Span<float3> positions,
}
continue;
}
if (!done_loops[i]) {
continue;
}
const int space_index = lnors_spacearr.corner_space_indices[i];
if (done_loops[i]) {
/* Note we accumulate and average all custom normals in current smooth fan,
* to avoid getting different clnors data (tiny differences in plain custom normals can
* give rather huge differences in computed 2D factors). */
@ -1684,7 +1686,6 @@ static void mesh_normals_loop_custom_set(Span<float3> positions,
}
}
}
}
void normals_loop_custom_set(const Span<float3> vert_positions,
const Span<int2> edges,