Jump to content
  • Advertisement
Sign in to follow this  
stephanh

OpenGL Interleave vertex data or not

This topic is 4229 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

Hi, i always used interleaved vertex buffers, since an old nvidia whitepaper on VBOs suggests to interleave data for optimal performance. Makes sense if one thinks about T&L cache and locality of per-vertex data in case theres a "single" cache. But several posts on the opengl.org forums state that things might be different these days. Does anybody have any information what data layouts recent hardware prefers? Thanks alot. regards, stephan

Share this post


Link to post
Share on other sites
Advertisement
I recently wrote some OpenGL benchmarks of my own to answer this exact question, and I found that on my old ATI card, the interleaving had no significant effect on frame rate. On my newer NVidia card the interleaving made an improvement of 10-15% in frame rate, but only when the interleaved array was in a vertex buffer object. When the vertex array was in main memory, the interleaving didn't add much. YMMV.

Share this post


Link to post
Share on other sites
I did implement interleaved VBOs in a terrain rendering project recently and it resulted in only 2-3 fps speed up

you gain a lot more speed if you zsort your chunks front to back thus you do a early z fail without an additional rendering pass

thats especially important if you do complex operations in the fragment shader, such as per pixel lighting as we do for the terrain

Share this post


Link to post
Share on other sites
I believe interleaving is a few percentage faster on older NVidia hardware. Bavoil has lots of statistics in his MS thesis: http://www.sci.utah.edu/~bavoil/opengl/

Patrick

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!