Advertisement

low precision formats for vertex data?

Started by June 15, 2013 05:22 PM
11 comments, last by 21st Century Moose 11 years, 7 months ago

So I managed to move some stuff around and I have got the structure down to 64 bytes. Using the same approach I managed to trim non animated data (scenery etc.) down to 32 bytes. I think regardless of the alignment it is still a good idea to reduce the size of vertex structures. Does anyone know if 32 byte alignment will have an effect on older GPUs DX9/GL2 era?

Yes, the 32-byte alignment rule of thumb came from that era of cards. The question is whether it's still relevant on newer ones wink.png

Yes, the 32-byte alignment rule of thumb came from that era of cards. The question is whether it's still relevant on newer ones wink.png

Well even though my game targets GL3/DX10 I still want to support cards that are older, especially in the OpenGL world many cards that are only a little old (especially integrated ones) don't support GL 3.0.

Advertisement

To my knowledge, the 32-byte alignment is really only relevant for software T&L cards, and may be relevant if you have a vertex order that requires a lot of non-sequential hopping around in the vertex buffer. Otherwise, using e.g. a 28-byte vertex format will actually cause your hardware to pre-fetch 4 extra bytes from the next vertex in the buffer, so if you're reading it sequentially then those 4 bytes are going to already be present and ready to use when time comes to process the next vertex. In some scenarios that may even be a performance gain.

Direct3D has need of instancing, but we do not. We have plenty of glVertexAttrib calls.

This topic is closed to new replies.

Advertisement