Diligent::BuildBLASAttribs struct

This structure is used by IDeviceContext::BuildBLAS().

Contents

Public variables

IBottomLevelAS* pBLAS
Target bottom-level AS. Access to the BLAS must be externally synchronized.
RESOURCE_STATE_TRANSITION_MODE BLASTransitionMode
Bottom-level AS state transition mode (see Diligent::RESOURCE_STATE_TRANSITION_MODE).
RESOURCE_STATE_TRANSITION_MODE GeometryTransitionMode
Geometry data source buffers state transition mode (see Diligent::RESOURCE_STATE_TRANSITION_MODE).
BLASBuildTriangleData const * pTriangleData
A pointer to an array of TriangleDataCount BLASBuildTriangleData structures that contains triangle geometry data. If Update is true:
Uint32 TriangleDataCount
The number of triangle grometries. Must be less than or equal to BottomLevelASDesc::TriangleCount. If Update is true then the count must be the same as the one used to build BLAS.
BLASBuildBoundingBoxData const * pBoxData
A pointer to an array of BoxDataCount BLASBuildBoundingBoxData structures that contain AABB geometry data. If Update is true:
Uint32 BoxDataCount
The number of AABB geometries. Must be less than or equal to BottomLevelASDesc::BoxCount. If Update is true then the count must be the same as the one used to build BLAS.
IBuffer* pScratchBuffer
The buffer that is used for acceleration structure building. Must be created with BIND_RAY_TRACING. Call IBottomLevelAS::GetScratchBufferSizes().Build to get the minimal size for the scratch buffer.
Uint32 ScratchBufferOffset
Offset from the beginning of the buffer.
RESOURCE_STATE_TRANSITION_MODE ScratchBufferTransitionMode
Scratch buffer state transition mode (see Diligent::RESOURCE_STATE_TRANSITION_MODE).
Bool Update
if false then BLAS will be built from scratch. If true then previous content of BLAS will be updated. pBLAS must be created with RAYTRACING_BUILD_AS_ALLOW_UPDATE flag. An update will be faster than building an acceleration structure from scratch.

Variable documentation

BLASBuildTriangleData const * Diligent::BuildBLASAttribs::pTriangleData

A pointer to an array of TriangleDataCount BLASBuildTriangleData structures that contains triangle geometry data. If Update is true:

  • Only vertex positions (in pVertexBuffer) and transformation (in pTransformBuffer) can be changed.
  • All other content in BLASBuildTriangleData and buffers must be the same as what was used to build BLAS.
  • To disable geometry, make all triangles inactive, see BLASBuildTriangleData::pVertexBuffer description.

BLASBuildBoundingBoxData const * Diligent::BuildBLASAttribs::pBoxData

A pointer to an array of BoxDataCount BLASBuildBoundingBoxData structures that contain AABB geometry data. If Update is true: