diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-08-03 14:50:31 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-08-03 15:27:31 +0300 |
commit | 60c8cdf763fa0ae7b81d629255ab4c63a00a061d (patch) | |
tree | 16a0cbd82e31231063f74c519d9c58ca43eecc9d /intern/opensubdiv/opensubdiv_evaluator_capi.cc | |
parent | 4bf26fda97d61bcaad8df52cac92e62c485e8513 (diff) |
OpenSubdiv: Switch CPU evaluator to use uniform refinement
This way the result matches GPU viewport and becomes really close to out
legacy subsurf code.
Diffstat (limited to 'intern/opensubdiv/opensubdiv_evaluator_capi.cc')
-rw-r--r-- | intern/opensubdiv/opensubdiv_evaluator_capi.cc | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/intern/opensubdiv/opensubdiv_evaluator_capi.cc b/intern/opensubdiv/opensubdiv_evaluator_capi.cc index b8527fda4e5..0da6b9daba8 100644 --- a/intern/opensubdiv/opensubdiv_evaluator_capi.cc +++ b/intern/opensubdiv/opensubdiv_evaluator_capi.cc @@ -351,15 +351,11 @@ OpenSubdiv_EvaluatorDescr *openSubdiv_createEvaluatorDescr( const StencilTable *varying_stencils = NULL; int num_total_verts = 0; - /* Apply adaptive refinement to the mesh so that we can use the + /* Apply uniform refinement to the mesh so that we can use the * limit evaluation API features. - * - * TODO(sergey): Once OpenSubdiv supports uniform meshes in limit - * evlauation we need to switch to uniform here, which will match - * original Blender subsurf. */ - TopologyRefiner::AdaptiveOptions options(subsurf_level); - refiner->RefineAdaptive(options); + TopologyRefiner::UniformOptions options(subsurf_level); + refiner->RefineUniform(options); /* Generate stencil table to update the bi-cubic patches control * vertices after they have been re-posed (both for vertex & varying @@ -367,7 +363,7 @@ OpenSubdiv_EvaluatorDescr *openSubdiv_createEvaluatorDescr( */ StencilTableFactory::Options soptions; soptions.generateOffsets = true; - soptions.generateIntermediateLevels = true; + soptions.generateIntermediateLevels = false; vertex_stencils = StencilTableFactory::Create(*refiner, soptions); |