Does meshopt_optimizeVertexCache, etc. preserve index order? #576
Closed
coffeenotfound
started this conversation in
General
Replies: 2 comments
-
While there is no formal guarantee that the indices in a triangle maintain their order beyond preserving winding, in practice both vertex cache optimization algorithms as well as most other algorithms with the exception of |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thanks! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm writing a visiblity renderer and for that I need efficient triangle ids. SV_PrimitiveID is very slow so I'm building my own mesh optimizer that injects triangle id's as vertex attributes with flat interpolation
For this I would run meshopt_optimizeVertexCache first, then my own pass and then meshopt_optimizeVertexCache again to reorder the vertices I put at the end of the list to a more sensible location.
So the important question is, does meshopt_optimizeVertexCache preserve the order of indices within a triangle? Or are the no guarentees whatsoever?
Beta Was this translation helpful? Give feedback.
All reactions