Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Raloth

vertex compresson - too much of a good thing?

This topic is 5457 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 have a vertex that is made up of the following: position (x,y,z) tex1 (u,v) tex2 (u,v) tex3 (u,v) I plan on compressing it and then uncompressing in a vertex shader. x and z for the position are only ever going to be integers and won''t ever be greater than 65535 so I can pack them together into 4 bytes. y will need to be a float and can be whatever I want so I will leave that alone. For the texture coordinates, I can pack each pair into 1 or 2 bytes. If I choose one then I end up with an 11 byte vertex. With 2 I end up with a 14 byte vertex. How much faster would it be to forget the compression on (xyz) and bump it up to 16 bytes? All of the developer articles I have read say that it would be best, but how much better is it?

Share this post


Link to post
Share on other sites
Advertisement
It may save a few cycles per vertex at transfer and transformation stages. The driver doesn''t need to pad the addresses to cache, if the vertex size is a multiple of the cache slot width.

-Nik

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!