Commit 9599a99f by Philipp Adolf

Only apply (update for draw) to border vertices

parent b27ec892
...@@ -1144,12 +1144,22 @@ void Subdivision::updateIrregularForDraw(const QVector<Triangle> &triangles,QMap ...@@ -1144,12 +1144,22 @@ void Subdivision::updateIrregularForDraw(const QVector<Triangle> &triangles,QMap
result.vertex_buffer_irregular[triangle.v_idx()] = result.vertex_buffer.at(triangle.v_idx()); result.vertex_buffer_irregular[triangle.v_idx()] = result.vertex_buffer.at(triangle.v_idx());
result.vertex_buffer_irregular[triangle.w_idx()] = result.vertex_buffer.at(triangle.w_idx()); result.vertex_buffer_irregular[triangle.w_idx()] = result.vertex_buffer.at(triangle.w_idx());
bool uv_sharp = (triangle.get_sharpness_uv() > 0);
bool vw_sharp = (triangle.get_sharpness_vw() > 0);
bool wu_sharp = (triangle.get_sharpness_wu() > 0);
Triangle::Neighbors ns = neighbors.value(triangle); Triangle::Neighbors ns = neighbors.value(triangle);
if (!(uv_sharp || wu_sharp)) {
result.vertex_buffer_irregular[triangle.u_idx()].pos = updateIrregularVertexForDraw(triangle.u(), vertexNeighbors(triangle, ns.uv, neighbors)); result.vertex_buffer_irregular[triangle.u_idx()].pos = updateIrregularVertexForDraw(triangle.u(), vertexNeighbors(triangle, ns.uv, neighbors));
}
if (!(uv_sharp || vw_sharp)) {
result.vertex_buffer_irregular[triangle.v_idx()].pos = updateIrregularVertexForDraw(triangle.v(), vertexNeighbors(triangle, ns.vw, neighbors)); result.vertex_buffer_irregular[triangle.v_idx()].pos = updateIrregularVertexForDraw(triangle.v(), vertexNeighbors(triangle, ns.vw, neighbors));
}
if (!(vw_sharp || wu_sharp)) {
result.vertex_buffer_irregular[triangle.w_idx()].pos = updateIrregularVertexForDraw(triangle.w(), vertexNeighbors(triangle, ns.wu, neighbors)); result.vertex_buffer_irregular[triangle.w_idx()].pos = updateIrregularVertexForDraw(triangle.w(), vertexNeighbors(triangle, ns.wu, neighbors));
} }
}
qCDebug(log_timing) << "updateIrregularForDraw done:" << formatTimeMeasurement(timer.elapsed()); qCDebug(log_timing) << "updateIrregularForDraw done:" << formatTimeMeasurement(timer.elapsed());
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment