LiteFX::Rendering::Backends::DirectX12TopLevelAccelerationStructure::addInstance¶
Adds an instance to the TLAS.
Synopses¶
Declared in <litefx/backends/dx12.hpp>
Adds an instance to the TLAS.
[[dllimport, dllexport]] virtual void addInstance(Instance const& instance) override;
Adds an instance to the TLAS.
[[dllimport, dllexport]] void addInstance(
SharedPtr<IBottomLevelAccelerationStructure const> const& blas,
UInt32 id,
UInt32 hitGroupOffset = 0,
UInt8 mask = 0xFF,
InstanceFlags flags = InstanceFlags::None) noexcept;
Adds an instance to the TLAS.
[[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¶
| Name | Description |
|---|---|
| instance | The instance to add to the TLAS. |
| blas | The bottom-level acceleration structure that contains the geometries of the instance. |
| id | The instance ID used in shaders to identify the instance. |
| hitGroupOffset | An offset added to the shader-local data for a hit-group shader record. |
| mask | A user defined mask value that can be used to include or exclude the instance during a ray-tracing pass. |
| flags | The flags that control the behavior of the instance. |
| transform | The transformation matrix applied to the instance geometry. |