This structure is used by BuildTLASAttribs. More...
#include <DeviceContext.h>
Public Attributes | |
| const Char * | InstanceName = nullptr |
| Instance name that is used to map an instance to a hit group in shader binding table. | |
| IBottomLevelAS * | pBLAS = nullptr |
| Bottom-level AS that represents instance geometry. | |
| InstanceMatrix | Transform |
| Instance to world transformation. | |
| Uint32 | CustomId = 0 |
| User-defined value that can be accessed in the shader. | |
| RAYTRACING_INSTANCE_FLAGS | Flags = RAYTRACING_INSTANCE_NONE |
| Instance flags, see Diligent::RAYTRACING_INSTANCE_FLAGS. | |
| Uint8 | Mask = 0xFF |
Visibility mask for the geometry, the instance may only be hit if rayMask & instance.Mask != 0. | |
| Uint32 | ContributionToHitGroupIndex = TLAS_INSTANCE_OFFSET_AUTO |
| The index used to calculate the hit group location in the shader binding table. | |
This structure is used by BuildTLASAttribs.
| Uint32 Diligent::TLASBuildInstanceData::ContributionToHitGroupIndex = TLAS_INSTANCE_OFFSET_AUTO |
The index used to calculate the hit group location in the shader binding table.
Must be Diligent::TLAS_INSTANCE_OFFSET_AUTO if BuildTLASAttribs::BindingMode is not Diligent::SHADER_BINDING_USER_DEFINED. Only the lower 24 bits are used.
| Uint32 Diligent::TLASBuildInstanceData::CustomId = 0 |
User-defined value that can be accessed in the shader.
InstanceID() in closest-hit and intersection shaders.RayQuery::CommittedInstanceID() within inline ray tracing.gl_InstanceCustomIndex in closest-hit and intersection shaders.rayQueryGetIntersectionInstanceCustomIndex within inline ray tracing.intersection_result< instancing >::instance_id.Only the lower 24 bits are used.
| Uint8 Diligent::TLASBuildInstanceData::Mask = 0xFF |
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(). | IBottomLevelAS* Diligent::TLASBuildInstanceData::pBLAS = nullptr |
Bottom-level AS that represents instance geometry.
Once built, TLAS will hold strong reference to pBLAS until next build or copy operation.