skinned constant

VertexLayout const skinned

standard plus the two skinning attributes.

A second layout rather than eight more floats on every vertex. The layout is structural — it is read off the vertex shader's in declarations — so this is inseparable from being a second vertex shader, and that permutation has to exist anyway: a static shader that declared the joint matrices without reading them is the phantom-uniform trap all over again. Paying 96 bytes a vertex on a static mesh to avoid the permutation would be the worse trade.

Implementation

static const VertexLayout skinned = VertexLayout([
  position,
  normal,
  texcoord,
  tangent,
  color,
  joints,
  weights,
]);