Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorPablo Dobarro <pablodp606@gmail.com>2020-08-03 18:58:46 +0300
committerPablo Dobarro <pablodp606@gmail.com>2020-08-05 18:50:28 +0300
commit531a3f6c4e8575f1b9cc5b8524c92cc7e5895cf4 (patch)
treebf42c65addf422e91661322c12d6b0a90ece7045 /source
parentadfde608311dd83585b49fb6d4f19dbd848cd252 (diff)
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
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/pbvh.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/pbvh.c b/source/blender/blenkernel/intern/pbvh.c
index 67988427bd2..92a47f24240 100644
--- a/source/blender/blenkernel/intern/pbvh.c
+++ b/source/blender/blenkernel/intern/pbvh.c
@@ -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);