Skip to content

LiteFX::Rendering::ITopLevelAccelerationStructure::addInstance

Adds an instance to the TLAS.

Synopsis

Declared in <litefx/rendering_api.hpp>

[[dllimport, dllexport]] void addInstance(
    SharedPtr<IBottomLevelAccelerationStructure const> const& blas,
    TMatrix3x4<Float> const& transform,
    UInt32 id,
    UInt32 hitGroupOffset = 0,
    UInt8 mask = 0xFF,
    InstanceFlags flags = InstanceFlags::None) noexcept;

Parameters

NameDescription
blasThe bottom-level acceleration structure that contains the geometries of the instance.
transformThe transformation matrix applied to the instance geometry.
idThe instance ID used in shaders to identify the instance.
hitGroupOffsetAn offset added to the shader-local data for a hit-group shader record.
maskA user defined mask value that can be used to include or exclude the instance during a ray-tracing pass.
flagsThe flags that control the behavior of the instance.