diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2013-11-28 03:13:32 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2013-11-28 05:11:42 +0400 |
commit | 731ffd3cd4c1d578fb02d39dc512bace850c2e8b (patch) | |
tree | 63cced11229d028a2d8a7e5b6c9600e4e0fa6351 /intern/cycles/app/cycles_xml.cpp | |
parent | af7a2a3b6a08bdbe99d295e593e770af165eb0e6 (diff) |
Cycles: remove approximate subdivision surface with gregory patches code.
It was never fully implemented and will be replaced by OpenSubdiv. Only linear
subdivision remains now. Also includes some refactoring in the split/dice code,
adding a SubdParams struct to pass around parameters more easily.
Diffstat (limited to 'intern/cycles/app/cycles_xml.cpp')
-rw-r--r-- | intern/cycles/app/cycles_xml.cpp | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/intern/cycles/app/cycles_xml.cpp b/intern/cycles/app/cycles_xml.cpp index 55a2a30b9a8..df187f046e5 100644 --- a/intern/cycles/app/cycles_xml.cpp +++ b/intern/cycles/app/cycles_xml.cpp @@ -703,15 +703,14 @@ static void xml_read_mesh(const XMLReadState& state, pugi::xml_node node) } /* finalize subd mesh */ - sdmesh.link_boundary(); - - /* subdivide */ - DiagSplit dsplit; - //dsplit.camera = state.scene->camera; - //dsplit.dicing_rate = 5.0f; - dsplit.dicing_rate = state.dicing_rate; - xml_read_float(&dsplit.dicing_rate, node, "dicing_rate"); - sdmesh.tessellate(&dsplit, false, mesh, shader, smooth); + sdmesh.finish(); + + /* parameters */ + SubdParams sdparams(mesh, shader, smooth); + xml_read_float(&sdparams.dicing_rate, node, "dicing_rate"); + + DiagSplit dsplit(sdparams);; + sdmesh.tessellate(&dsplit); } else { /* create vertices */ @@ -789,12 +788,11 @@ static void xml_read_patch(const XMLReadState& state, pugi::xml_node node) mesh->used_shaders.push_back(state.shader); /* split */ - DiagSplit dsplit; - //dsplit.camera = state.scene->camera; - //dsplit.dicing_rate = 5.0f; - dsplit.dicing_rate = state.dicing_rate; - xml_read_float(&dsplit.dicing_rate, node, "dicing_rate"); - dsplit.split_quad(mesh, patch, state.shader, state.smooth); + SubdParams sdparams(mesh, state.shader, state.smooth); + xml_read_float(&sdparams.dicing_rate, node, "dicing_rate"); + + DiagSplit dsplit(sdparams); + dsplit.split_quad(patch); delete patch; |