Struct AccelerationStructureInstance
This data structure is used in GPU memory during the acceleration structure build. This struct definition is useful if generating instance data on the CPU first, then uploading it to the GPU. However, applications are also free to generate instance descriptions directly into GPU memory from compute shaders, following the same layout.
Namespace: Evergine.Common.Graphics.Raytracing
Assembly: Evergine.Common.dll
Syntax
public struct AccelerationStructureInstance
Fields
BottonLevel
The bottom-level acceleration structure that is being instanced.
Declaration
public BottomLevelAS BottonLevel
Field Value
Type | Description |
---|---|
BottomLevelAS |
Flags
Flags from AccelerationStructureInstanceFlags to be applied to the instance.
Declaration
public AccelerationStructureInstanceFlags Flags
Field Value
Type | Description |
---|---|
AccelerationStructureInstanceFlags |
InstanceContributionToHitGroupIndex
Per-instance contribution to add into shader table indexing to select the hit group to use. It is the offset of the instance inside the shader-binding-table.
Declaration
public uint InstanceContributionToHitGroupIndex
Field Value
Type | Description |
---|---|
uint |
InstanceID
An arbitrary 24-bit value that can be accessed via InstanceID() in the shader.
Declaration
public uint InstanceID
Field Value
Type | Description |
---|---|
uint |
InstanceMask
An 8-bit mask assigned to the instance, used to include or reject groups of instances on a per-ray basis.
Declaration
public byte InstanceMask
Field Value
Type | Description |
---|---|
byte |
Transform4x4
A 4x4 transformation matrix in row-major layout representing the instance-to-world transformation.
Declaration
public Matrix4x4 Transform4x4
Field Value
Type | Description |
---|---|
Matrix4x4 |