The selection engine renders a uint texture with the selectable mesh indices.
When these meshes have modifiers, the original index is used for the texture.
However this does not seem to be necessary. The real mesh indexes can be used in the texture and, only at the end, the original index can be retrieved on the CPU itself.
Advantages of this approach:
- Optimizes the code to generate selection buffers.
- Makes the select id texture more informative as it identifies the real elements instead of the original ones.