Sculpt: Raise pbvh->leaf_limit to 400 for dyntopo

Setting pbvh->leaf_limit (the max triangles per node)
too low results in lots of distinct GPU meshes, which
can be slow for even moderately sized sculpt meshes
(starts to be a problem around 100-150k triangles).
This commit is contained in:
Joseph Eagar 2022-10-06 14:06:16 -07:00
parent dfa0eb298e
commit 53d937a170
1 changed files with 1 additions and 1 deletions

View File

@ -1884,7 +1884,7 @@ void BKE_pbvh_build_bmesh(PBVH *pbvh,
pbvh->bm_log = log;
/* TODO: choose leaf limit better */
pbvh->leaf_limit = 100;
pbvh->leaf_limit = 400;
BKE_pbvh_update_bmesh_offsets(pbvh, cd_vert_node_offset, cd_face_node_offset);