Struct AccelerationStructureInstance
This data structure is used in GPU memory during acceleration structure build. This struct definition is useful if generating instance data on the CPU first then uploading to the GPU. But apps are also free to generate instance descriptions directly into GPU memory from compute shaders for instance, following the same layout.
Inherited Members
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 apply 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 sahder-binding-table.
Declaration
public uint InstanceContributionToHitGroupIndex
Field Value
Type | Description |
---|---|
uint |
InstanceID
An arbitrary 24-bit value that can be accessed via InstanceID() in shader.
Declaration
public uint InstanceID
Field Value
Type | Description |
---|---|
uint |
InstanceMask
An 8-bit mask assigned to the instance, which can be used to include/reject groups of instances on a per-ray basis.
Declaration
public byte InstanceMask
Field Value
Type | Description |
---|---|
byte |
Transform4x4
A 4x4 transform matrix in row major layout representing the instance-to-world transformation.
Declaration
public Matrix4x4 Transform4x4
Field Value
Type | Description |
---|---|
Matrix4x4 |