Skip to content
Discussion options

You must be logged in to vote

There isn't a way to do this out of the box. Probably remapping the triangle data with a hash map after the function completes is the best option here; optimizeVertexCache keeps the order of indices in the triangle consistent I believe, so you can just key the hash map by the index triple.

Not directly related, but beware: using gl_PrimitiveID in fragment shader on all NVidia hardware (and early AMD GPUs, but that's less of a concern because they aren't as common) is not great for performance. It switches the pipeline to some sort of alternate mode of operation that is a little similar to their FastGS feature, and results in a reduced rate of geometry processing. Of course you may not nec…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@theagentd
Comment options

@zeux
Comment options

zeux Nov 17, 2025
Maintainer

@theagentd
Comment options

@zeux
Comment options

zeux Nov 17, 2025
Maintainer

Answer selected by theagentd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants