Usage:
Code: Select all
ogrexmlconverter -merge 0,1 myFile.mesh.xml
This is very useful to save interpolators. Some GPUs work faster (negligible gain probably, though), but more importantly, this makes a lot easier to handle shader permutations when you write complex übershaders.
The merge happens after generating the tangents (otherwise it may get screwed?)
Note that the merge doesn't happen if the following rules aren't met:
- Both texcoords. must be in the same buffer source.
- Both texcoords. must be adjancent in memory (i.e. nothing between them).
- Both texcoords. must be of the same type (you can't mix short with float)
- There has to be enough room. You can't merge float2 with float3 because there is no float5. The merge will fail.
This is a long shot from the "vertex.layout" I want for 2.x; but it satisfies our current, more urgent needs; and probably other people too.
Enjoy!