#include <RadientVertexLayout.h>
Public Attributes | |
| const Char * | Semantic = nullptr |
| Uint32 | BufferIndex = 0 |
| Uint32 | ByteOffset = RADIENT_VERTEX_AUTO_OFFSET |
| RADIENT_VERTEX_COMPONENT_TYPE | ComponentType = RADIENT_VERTEX_COMPONENT_TYPE_UNKNOWN |
| Uint32 | ComponentCount = 0 |
| Bool | Normalized = False |
Description of one scalar or vector attribute repeated in every vertex record.
The attribute selects a logical buffer from RadientVertexLayoutDesc::pBuffers and occupies ComponentCount consecutive components starting at ByteOffset in each record. ComponentType and Normalized define how to interpret those bytes. The entire attribute fits within the selected buffer's resolved ByteStride. Automatic offsets and strides are resolved from the attribute sizes and order.
A default-initialized descriptor is incomplete: Semantic, ComponentType, and ComponentCount must be specified before it can be used in a nonempty layout.
| Uint32 Diligent::RadientVertexAttributeDesc::BufferIndex = 0 |
Zero-based index of the logical buffer containing this attribute, in RadientVertexLayoutDesc::pBuffers. Must be less than the layout's BufferCount. Attributes with the same index share the buffer's vertex records and stride. This is a layout-local index, not a GPU binding slot or a resource handle. The default is zero, selecting the first buffer.
| Uint32 Diligent::RadientVertexAttributeDesc::ByteOffset = RADIENT_VERTEX_AUTO_OFFSET |
Byte offset of the first component relative to the start of each vertex record in the selected logical buffer. For vertex i, after resolving automatic values, the attribute starts at bufferStart + i * ByteStride + ByteOffset. The buffer's base address or allocation/view offset is supplied separately and is not included here.
RADIENT_VERTEX_AUTO_OFFSET (the C++ default) places this attribute at the largest end offset of preceding attributes in the same buffer, in pAttributes array order. If there are no preceding attributes in that buffer, the offset is zero. No alignment padding is inserted. Explicit offsets contribute to the end offset used by subsequent automatic attributes, even when explicit attributes overlap or appear out of byte order.
After resolution, ByteOffset + GetRadientVertexAttributeSize(attribute) must not exceed that buffer's ByteStride. Zero explicitly selects the first byte of the record; 0xFFFFFFFF is reserved for automatic placement. C callers set RADIENT_VERTEX_AUTO_OFFSET explicitly to request packing.
| Uint32 Diligent::RadientVertexAttributeDesc::ComponentCount = 0 |
Number of scalar components in one attribute value, from 1 through 4. One component describes a scalar; two through four describe a vector. Its byte size is ComponentCount * GetRadientVertexComponentSize(ComponentType). The default is zero, which is invalid for an attribute in a layout.
| RADIENT_VERTEX_COMPONENT_TYPE Diligent::RadientVertexAttributeDesc::ComponentType = RADIENT_VERTEX_COMPONENT_TYPE_UNKNOWN |
Storage encoding shared by all components of this attribute. Must be a defined RADIENT_VERTEX_COMPONENT_TYPE other than UNKNOWN. Components are consecutive, with no padding between them, and use native byte order. Normalized controls integer interpretation separately from this encoding. The default is UNKNOWN, which must be replaced with a valid encoding.
| Bool Diligent::RadientVertexAttributeDesc::Normalized = False |
Whether integer components represent normalized values. When True, an unsigned b-bit value v represents v / (2^b - 1) in [0, 1]; a signed b-bit value represents max(v / (2^(b-1) - 1), -1) in [-1, 1]. These expressions use real-number division. Both the minimum signed value and the next value map to -1; the maximum signed or unsigned value maps to 1.
True is permitted only for INT8, UINT8, INT16, and UINT16. INT32, UINT32, FLOAT16, and FLOAT32 must use False. The default is False: integer values retain their numeric values, and floating-point values use their encoding directly. This flag does not change the component size or the stored bytes.
| const Char* Diligent::RadientVertexAttributeDesc::Semantic = nullptr |
Null-terminated, nonempty, case-sensitive name identifying the attribute. Must be non-null and unique across all attributes in the layout, including attributes in different buffers. Examples include POSITION, NORMAL, TANGENT, TEXCOORD_0, COLOR_1, JOINTS_0, WEIGHTS_0, and application-defined names. A name does not assign a shader input location or implicitly select a component encoding or count.
The default is nullptr, which is invalid for an attribute in a layout. Radient copies the string when storing the layout. The caller can modify or release the original string after the API call returns.