ConstantBufferAttribute

Description

sealed class Tinman.Gpu.Semantic.ConstantBufferAttribute

Derived from

Attribute abstract

Associated the annotated static class with a constant buffer definition.

When naming constant buffers, the following convention should be taken into account:

  • Use the name prefix CB_ for classes that represent constant buffer definitions.

  • Use the name suffix _Static for constant buffers that hold parameters that are updated roughly once per frame.

  • Use the name suffix _Dynamic for constant buffers that hold parameters that are likely to change multiple times per frame.

  • Use the name suffix _Volatile for constant buffers that hold parameters that are likely to change between primitive batches.

The data fields of a constant buffer (scalar, vector, matrix, array, struct) will be laid out and packed on the GPU in an implementation-dependent way. The actual data layout of each constant buffer in a compiled render effect is queried at runtime using the graphics API and then used accordingly.

See also

Order