Adjust LOD selection metrics to use attribute error
- Revert meshoptimizer patch; the metric used for LOD selection now incorporates attribute error - Since LOD selection is now aware of attribute deviation, we don't need to use a higher normal weight - To prevent normal creases from creating input triangles with very large normal deviation, reduce default normal merge threshold - Since we now use combined metric to select LODs, we never need LODs with error>1 as these should not be selected if the mesh is visible.
This commit is contained in:
parent
c3ae6aa10b
commit
6190d412d3
4 changed files with 6 additions and 19 deletions
2
thirdparty/meshoptimizer/simplifier.cpp
vendored
2
thirdparty/meshoptimizer/simplifier.cpp
vendored
|
|
@ -2048,7 +2048,7 @@ size_t meshopt_simplifyEdge(unsigned int* destination, const unsigned int* indic
|
|||
|
||||
// result_error is quadratic; we need to remap it back to linear
|
||||
if (out_result_error)
|
||||
*out_result_error = sqrtf(vertex_error) * error_scale;
|
||||
*out_result_error = sqrtf(result_error) * error_scale;
|
||||
|
||||
return result_count;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue