Skip to content

LiteFX::Rendering::IBottomLevelAccelerationStructure::BoundingBoxes::Buffer

A buffer containing the bounding box definitions.

Synopsis

Declared in <litefx/rendering_api.hpp>

SharedPtr<IBuffer const> Buffer;

Description

Each element of the buffer must contain a bounding box at the start of the buffer, where a bounding box takes up 6 single-precision floating point values, with the first triplet describing the lower corner of the bounding box and the second triplet describing the upper corner of the bounding box, as shown in the following definition:


struct alignas(16) AABB {
    Float minimum[3];
    Float maximum[3];
}

The rest of the bounding box elements memory can be filled with arbitrary data, that can be read by shaders.