Vertex Data Format Optimization

Started by
1 comment, last by MJP 12 years, 2 months ago
Just a couple questions that have been bugging me... I'm wondering what kind of impact each of these elements has on the GPU.

Small vertex data, non 32/64-byte, does this have a significant performance impact? Some documents say to use 32 bytes but I don't know how up to date they are. I'm also manipulating/creating a lot of the vertex data so small vertexes would definitely help out the CPU side.

Floats for data values. It seems a lot of examples/sources use floats as for the data values. Does using other data types for values have any significant slowdown?

Any info or documents about these topics would be very helpful, thanks!
Advertisement
The best way to get accurate performance information for your situation is to implement both methods and profile them on the hardware you care about.

However, if I was manipulating lots of vertex data on the CPU, I'd go for whatever format makes that process most efficient. The GPU can process vertices much quicker than the CPU, and unless the polygons are tiny pixels will be much more expensive to process than vertices anyway.
It depends on the GPU, so you'd have to profile to be sure. The general trend on modern GPU's is that the performance impacts of accessing more memory will outweigh having some extra shader math to unpack the values. In that regard, using more compact vertex data formats (half-precision floats, 8 or 16-bit normalized integers, etc) is probably going to win out over having less-compact 32-bit float formats.

This topic is closed to new replies.

Advertisement