Is it often used in graphics engines? When should I bother to implement it?
Edited by Xcrypt, 20 November 2012 - 11:29 AM.
Posted 21 November 2012 - 01:16 AM
Edited by Hodgman, 21 November 2012 - 01:20 AM.
Posted 21 November 2012 - 06:25 PM
struct Vertex
{
float3 Position;
float3 Normal;
float2 TexCoord;
};
// Vertex buffer 1 - Positions pos1 | pos2 | pos3 | pos4 | ... // Vertex buffer 2 - Normals norm1 | norm2 | norm3 | norm4 | ... // Vertex buffer 3 - TexCoords tex1 | tex2 | tex3 | tex4 | ...
// Vertex buffer 1 - Positions, normals and texcoords all interleaved pos1 | norm1 | tex1 | pos2 | norm2 | tex2 | pos3 | norm3 | tex3 | pos4 | norm4 | tex4 | ...Then the device only reads one 32 byte chunk which is a 3x bandwidth saver.
Edited by hupsilardee, 21 November 2012 - 06:30 PM.
Posted 21 November 2012 - 07:33 PM
When making modern games on 6 year old hardware, everything is done on a game-by-game basis.So would a AAA console game where memory (and/or bandwidth) is, or is preferably, tight typically use separate streams or would they use the default stream? Or would it be on a game-by-game basis?
That's a good point -- vertices are cheap. You can fit half a million of your hypothetical vertex structure into the same space as that single texture.I bet your entire game's vertex content weighs less than your 2048x2048 shadow map anyway