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 AccelerationStructureInstanceFields
BottonLevel
The bottom-level acceleration structure that is being instanced.
Declaration
public BottomLevelAS BottonLevelField Value
| Type | Description | 
|---|---|
| BottomLevelAS | 
Flags
Flags from AccelerationStructureInstanceFlags to be applied to the instance.
Declaration
public AccelerationStructureInstanceFlags FlagsField 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 InstanceContributionToHitGroupIndexField Value
| Type | Description | 
|---|---|
| uint | 
InstanceID
An arbitrary 24-bit value that can be accessed via InstanceID() in the shader.
Declaration
public uint InstanceIDField 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 InstanceMaskField Value
| Type | Description | 
|---|---|
| byte | 
Transform4x4
A 4x4 transformation matrix in row-major layout representing the instance-to-world transformation.
Declaration
public Matrix4x4 Transform4x4Field Value
| Type | Description | 
|---|---|
| Matrix4x4 |