LiteFX::Rendering::ITopLevelAccelerationStructure::withInstance¶
Adds an instance to the current TLAS.
Synopsis¶
Declared in <litefx/rendering_api.hpp>
template<typename TSelf>
TSelf&& withInstance(this
TSelf&& self,
SharedPtr<IBottomLevelAccelerationStructure const> const& blas,
UInt32 id,
UInt32 hitGroupOffset = 0,
UInt8 mask = 0xFF,
InstanceFlags flags = InstanceFlags::None) noexcept;
Return Value¶
A reference to the current TLAS.
Parameters¶
| Name | Description |
|---|---|
| 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. |