Jump to content
  • Advertisement
Sign in to follow this  
Quat

Optimal Vertex Struct Size

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

I remember reading a few years ago that it was recommended to make your vertex struct sizes multiples of 32-bytes. So probably one would use either 32-byte or 64-byte. The DX9 docs even have a comment: "The most important things with vertex performance is to use a 32-byte vertex, and to maintain good cache ordering." Is this still true on Direct3D 10 and 11 hardware?

Basically, I am making a point sprite that just needs a position and size component, and I'm wondering if I should just use my generic 32-byte vertex structure and put the size in the texture coordinate slot.

Share this post


Link to post
Share on other sites
Advertisement
Elsewhere it says "If your application needs random access into the vertex buffer in AGP memory, choose a vertex format size that is a multiple of 32 bytes. Otherwise, select the smallest appropriate format", so the smaller one is probably a good idea.

If you use 16-bit precision on the position and 8-bit precision on the size, you could have a 7-byte vertex format.

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!