Sculpt: Use vertices instead of faces to limit the grids in each PBVH node
This uses the vertices per grid instead of quads to set the limit of grids per PBVH Node. This should create more leaf nodes in lower subdivisions levels where the duplicates count is high, producing more uniform performance across different levels. Reviewed By: sergey Differential Revision: https://developer.blender.org/D8454
This commit is contained in:
parent
adfde60831
commit
531a3f6c4e
|
@ -644,7 +644,7 @@ void BKE_pbvh_build_grids(PBVH *pbvh,
|
|||
pbvh->totgrid = totgrid;
|
||||
pbvh->gridkey = *key;
|
||||
pbvh->grid_hidden = grid_hidden;
|
||||
pbvh->leaf_limit = max_ii(LEAF_LIMIT / ((gridsize - 1) * (gridsize - 1)), 1);
|
||||
pbvh->leaf_limit = max_ii(LEAF_LIMIT / (gridsize * gridsize), 1);
|
||||
|
||||
BB cb;
|
||||
BB_reset(&cb);
|
||||
|
|
Loading…
Reference in New Issue