D3D12DDI_RAYTRACING_INSTANCE_DESC_0054 structure (d3d12umddi.h)
Describes a ray tracing instance. This data structure is used in GPU memory during acceleration structure build, and is useful if generating instance data on the CPU first then uploading to the GPU.
Syntax
typedef struct D3D12DDI_RAYTRACING_INSTANCE_DESC_0054 {
FLOAT Transform[3][4];
UINT InstanceID : 24;
UINT InstanceMask : 8;
UINT InstanceContributionToHitGroupIndex : 24;
UINT Flags : 8;
D3D12DDI_GPU_VIRTUAL_ADDRESS AccelerationStructure;
} D3D12DDI_RAYTRACING_INSTANCE_DESC_0054;
Members
Transform[3]
A 3x4 transform matrix in row major layout representing the instance-to-world transformation.
InstanceID
An arbitrary 24-bit value in shader types.
InstanceMask
An 8-bit mask assigned to the instance, which can be used to include or reject groups of instances on a per-ray basis. If the value is zero, the instance will never be included. Set this value to a nonzero value.
InstanceContributionToHitGroupIndex
Per-instance contribution to add into shader table indexing to select the hit group to use.
Flags
Flags to apply to the instance.
AccelerationStructure
Address of the bottom-level acceleration structure that is being instanced. The address must be aligned to 256 bytes.
The memory pointed to must be in resource state D3D12DDI_RESOURCE_STATE_RAYTRACING_ACCELERATION_STRUCTURE.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 10, version 1809 |
Header | d3d12umddi.h |