Jump to content
  • Advertisement
Sign in to follow this  
Quat

d3d11 Vertex Sizes

This topic is 2532 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 am targeting Direct3D 11 hardware. I am wondering if I need to pay attention to the size of my vertices. Some of my vertices with skinning can get over 64 bytes. Is it worth while to use DXGI_FORMAT_R16G16B16_FLOAT instead of DXGI_FORMAT_R32G32B32_FLOAT say for normals and tangents? Likewise, I probably don't need 32-bit precision for my blend weights.

Is there conversion overhead when converting from R16_FLOAT to an R32_FLOAT in the shader? That is, if I submit R16_FLOAT data but use "float" in the shader code, is there overhead?

Share this post


Link to post
Share on other sites
Advertisement

I am targeting Direct3D 11 hardware. I am wondering if I need to pay attention to the size of my vertices. Some of my vertices with skinning can get over 64 bytes. Is it worth while to use DXGI_FORMAT_R16G16B16_FLOAT instead of DXGI_FORMAT_R32G32B32_FLOAT say for normals and tangents? Likewise, I probably don't need 32-bit precision for my blend weights.

Is there conversion overhead when converting from R16_FLOAT to an R32_FLOAT in the shader? That is, if I submit R16_FLOAT data but use "float" in the shader code, is there overhead?


Well, 16 bit floats take up less memory, therefore your vertices take up less space in the memory on your graphics card, and if you use your buffers dynamically and update them from CPU, then there is less data to send over to the card.

As far as I know in DIrectX 10 and up the 32 bit float is what is used everywhere, and therefore I would assume there would be very little or no penalty for the conversion.

That's my 2 cents, hopefully it will help.

Share this post


Link to post
Share on other sites
Most modern GPU's will do the format conversion in the shader by patching the vertex shader. However on any modern GPU is generally much better to use a little ALU for unpacking rather than use more bandwidth. So you should profile to know for sure, but in general using lower-precision formats should be a win.

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.

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!