diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-08-05 15:43:51 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-08-05 15:43:51 +0300 |
commit | 6cba20a8e60513ce73c4a75f44caafb854b359a1 (patch) | |
tree | c661567c8612ea4040c3fb8e7bf7529b43b1f171 /source/blender/blenkernel/intern/subsurf_ccg.c | |
parent | 5b76f72904f83a80525cbea9cca4881358961bc0 (diff) |
OpenSubdiv: Tweaks to AABB calculation when using opensubdiv for subsurf
Use coarse coordinates to calculate AABB which gives much better approximation
of AABB than using unity AABB size.
Diffstat (limited to 'source/blender/blenkernel/intern/subsurf_ccg.c')
-rw-r--r-- | source/blender/blenkernel/intern/subsurf_ccg.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/subsurf_ccg.c b/source/blender/blenkernel/intern/subsurf_ccg.c index a3e4b47fd15..617bf70c081 100644 --- a/source/blender/blenkernel/intern/subsurf_ccg.c +++ b/source/blender/blenkernel/intern/subsurf_ccg.c @@ -848,6 +848,13 @@ static void ccgDM_getMinMax(DerivedMesh *dm, float r_min[3], float r_max[3]) int i, edgeSize = ccgSubSurf_getEdgeSize(ss); int gridSize = ccgSubSurf_getGridSize(ss); +#ifdef WITH_OPENSUBDIV + if (ccgdm->useGpuBackend) { + ccgSubSurf_getMinMax(ccgdm->ss, r_min, r_max); + return; + } +#endif + CCG_key_top_level(&key, ss); if (!ccgSubSurf_getNumVerts(ss)) |