Jump to content
  • Advertisement
Sign in to follow this  
bimm

Vertex Data Format Optimization

This topic is 2505 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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!

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!