0
\$\begingroup\$

Is there any other recommended data I should store in the vertex buffers aside from a vertex' coordinates, normals and texture coordinates? For example data I'd need for a feature that almost every mature game engine implements later on?

\$\endgroup\$
3
\$\begingroup\$

If you do tangent space normal mapping, as practically every game does nowdays, you should also store tangent space (binormal and tangent in addition to normal). For skinned characters you also need to store multiple (usually 4) bone indices and weights.

In addition there can be multiple UV coordinates, some texture blending weights, color data, spherical harmonic coefficient, etcetc. as well, but it really depends what kind of graphics features and algorithms you implement.

| improve this answer | |
\$\endgroup\$
  • 1
    \$\begingroup\$ Tangent space normal mapping is also doable without tangent/binormal, you can calculate them in the pixel shader, which could be a bit slower. \$\endgroup\$ – János Turánszki Sep 13 '14 at 13:33
  • \$\begingroup\$ That's a good point. Most games, as far as I'm aware, store tangent space to vertices though. \$\endgroup\$ – JarkkoL Sep 13 '14 at 14:10
  • \$\begingroup\$ So vertex data size doesn't seem to be a bottleneck on modern GPUs, if I understand correctly? \$\endgroup\$ – Moritz Gunz Sep 13 '14 at 17:29
  • \$\begingroup\$ It really depends on the situation. If you do very little vertex and pixel processing then fetching vertex data can be a bottleneck. This is why some developers have special vertex format for shadow depth pass. \$\endgroup\$ – JarkkoL Sep 13 '14 at 17:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.