Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 17825

Controlling Subsets' Material IDs

$
0
0
I split up the mesh into subsets. The final product as 116 subsets, I notice 2 or more faces could be merged into one subset, and render in one batch. How do I control the Material IDs, The scenario is I need to create 116 materials as after-product if there is 116 subsets generated. I look up the material by the attribute table's attribId, but the ids scatter around, for example, the first subset attrib id is 0 and the next is 60 Should I make up another level of lookups, say attrib id 0 and 60 goes to material slot 0 and atrrib id 1,2,3,61 go to slot 1? https://www.mvps.org/directx/articles/mesh_subset.htm The picture shows everybody maps to subset 0 The function still returns 116 subsets rather than 1 Thanks Jack

Viewing all articles
Browse latest Browse all 17825

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>