Structures

VkVertexInputBindingDivisorDescription

Structure specifying a divisor used in instanced rendering

The individual divisor values per binding are specified using the VkVertexInputBindingDivisorDescription structure which is defined as:

typedef struct VkVertexInputBindingDivisorDescription {
    uint32_t binding;
    uint32_t divisor;
} VkVertexInputBindingDivisorDescription;

or the equivalent

typedef VkVertexInputBindingDivisorDescription VkVertexInputBindingDivisorDescriptionKHR;

or the equivalent

typedef VkVertexInputBindingDivisorDescription VkVertexInputBindingDivisorDescriptionEXT;
  • binding is the binding number for which the divisor is specified.
  • divisor is the number of successive instances that will use the same value of the vertex attribute when instanced rendering is enabled. For example, if the divisor is N, the same vertex attribute will be applied to N successive instances before moving on to the next vertex attribute. The maximum value of divisor is implementation-dependent and can be queried using VkPhysicalDeviceVertexAttributeDivisorProperties::maxVertexAttribDivisor. A value of 0 can be used for the divisor if the vertexAttributeInstanceRateZeroDivisor feature is enabled. In this case, the same vertex attribute will be applied to all instances.

If this structure is not used to define a divisor value for an attribute, then the divisor has a logical default value of 1.