Diligent::TLASBuildInstanceData struct

This structure is used by BuildTLASAttribs.

Contents

Public variables

const char* InstanceName
Instance name that is used to map an instance to a hit group in shader binding table.
IBottomLevelAS* pBLAS
Bottom-level AS that represents instance geometry. Once built, TLAS will hold strong reference to pBLAS until next build or copy operation. Access to the BLAS must be externally synchronized.
InstanceMatrix Transform
Instace to world transformation.
Uint32 CustomId
User-defined value that can be accessed in the shader via InstanceID() in HLSL and gl_InstanceCustomIndex in GLSL. Only the lower 24 bits are used.
RAYTRACING_INSTANCE_FLAGS Flags
Instance flags, see Diligent::RAYTRACING_INSTANCE_FLAGS.
Uint8 Mask
Visibility mask for the geometry, the instance may only be hit if rayMask & instance.Mask != 0. ('rayMask' in GLSL is a 'cullMask' argument of traceRay(), 'rayMask' in HLSL is an 'InstanceInclusionMask' argument of TraceRay()).
Uint32 ContributionToHitGroupIndex
The index used to calculate the hit group location in the shader binding table. Must be TLAS_INSTANCE_OFFSET_AUTO if BuildTLASAttribs::BindingMode is not SHADER_BINDING_USER_DEFINED. Only the lower 24 bits are used.