[Bf-blender-cvs] [60c8cdf] master: OpenSubdiv: Switch CPU evaluator to use uniform refinement
Sergey Sharybin
noreply at git.blender.org
Mon Aug 3 14:57:53 CEST 2015
Commit: 60c8cdf763fa0ae7b81d629255ab4c63a00a061d
Author: Sergey Sharybin
Date: Mon Aug 3 13:50:31 2015 +0200
Branches: master
https://developer.blender.org/rB60c8cdf763fa0ae7b81d629255ab4c63a00a061d
OpenSubdiv: Switch CPU evaluator to use uniform refinement
This way the result matches GPU viewport and becomes really close to out
legacy subsurf code.
===================================================================
M intern/opensubdiv/opensubdiv_evaluator_capi.cc
===================================================================
diff --git a/intern/opensubdiv/opensubdiv_evaluator_capi.cc b/intern/opensubdiv/opensubdiv_evaluator_capi.cc
index b8527fd..0da6b9d 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);
More information about the Bf-blender-cvs
mailing list