pub struct BlasTriangleGeometry<'a> {
pub size: &'a BlasTriangleGeometrySizeDescriptor,
pub vertex_buffer: &'a Buffer,
pub first_vertex: u32,
pub vertex_stride: BufferAddress,
pub index_buffer: Option<&'a Buffer>,
pub first_index: Option<u32>,
pub transform_buffer: Option<&'a Buffer>,
pub transform_buffer_offset: Option<BufferAddress>,
}
Expand description
Definition for a triangle geometry for a Bottom Level Acceleration Structure (BLAS).
The size must match the rest of the structures fields, otherwise the build will fail. (e.g. if index count is present in the size, the index buffer must be present as well.)
Fields§
§size: &'a BlasTriangleGeometrySizeDescriptor
Sub descriptor for the size defining attributes of a triangle geometry.
vertex_buffer: &'a Buffer
Vertex buffer.
first_vertex: u32
Offset into the vertex buffer as a factor of the vertex stride.
vertex_stride: BufferAddress
Vertex stride, must be greater than wgpu_types::VertexFormat::min_acceleration_structure_vertex_stride
of the format and must be a multiple of wgpu_types::VertexFormat::acceleration_structure_stride_alignment
.
index_buffer: Option<&'a Buffer>
Index buffer (optional).
first_index: Option<u32>
Number of indexes to skip in the index buffer (optional, required if index buffer is present).
transform_buffer: Option<&'a Buffer>
Transform buffer containing 3x4 (rows x columns, row major) affine transform matrices [f32; 12]
(optional).
transform_buffer_offset: Option<BufferAddress>
Transform buffer offset in bytes (optional, required if transform buffer is present).