Commit b1575591 by Philipp Adolf

Fill edge sharpness buffer

parent a7445df0
......@@ -974,7 +974,16 @@ Subdivision::Result Subdivision::runShader(Input input, Tables &tables) {
//prepare sharpness buffer
QVector<unsigned int> sharpness;
for (int i = 0; i < tables.edge_indices.size(); i+= 4){
sharpness.push_back(0);
unsigned int u = tables.edge_indices[i];
unsigned int v = tables.edge_indices[i+1];
Edge uv(u,v);
Edge vu(v,u);
if (input.sharp_edges.contains(uv)){
sharpness.push_back(input.sharp_edges[uv]);
}else if (input.sharp_edges.contains(vu)){
sharpness.push_back(input.sharp_edges[vu]);
}
else sharpness.push_back(0);
}
qCWarning(log_subdiv_trace)<<"Sharpness: "<< sharpness;
GLuint edge_sharpness_handle;
......
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