Mesh: Avoid computing corner normals for drawing if unnecessary

Only compute face corner normals if they are required for computing
tangents or if it's required because of the combination of sharp edges
and faces.

Pull Request: https://projects.blender.org/blender/blender/pulls/132821
This commit is contained in:
Hans Goudey
2025-01-08 21:42:20 +01:00
committed by Hans Goudey
parent a3f523fd61
commit 9945563fac

View File

@@ -56,7 +56,10 @@ static void mesh_extract_render_data_node_exec(void *__restrict task_data)
if (request_face_normals) {
mesh_render_data_update_face_normals(mr);
}
if ((request_corner_normals && !mr.use_simplify_normals) || force_corner_normals) {
if ((request_corner_normals && mr.normals_domain == bke::MeshNormalDomain::Corner &&
!mr.use_simplify_normals) ||
force_corner_normals)
{
mesh_render_data_update_corner_normals(mr);
}