GpuGeometry¶
Import: import system.gpu;
This reference lists the public declarations for this part of the library. See Reading API signatures for parameter and result notation. Shader-only declarations can be used only inside @compute, @vertex, @fragment, inferred helpers and ray tracing shader functions; using them elsewhere is a compile error.
GpuGeometry¶
The geometry of one bottom-level acceleration structure: triangles from a vertex buffer, or boxes around custom shapes that an @intersection shader tests.
triangles¶
Triangles whose corners are consecutive triples of positions.
boxes¶
Custom shapes, one per pair of bounds corners: each box is its minimum corner followed by its maximum corner.
indexed¶
Builds triangles from consecutive triples of indices into the positions instead of consecutive positions, and returns this geometry. Only for triangles.
opaque¶
Sets whether the geometry is opaque, and returns this geometry. Any-hit shaders only run for non-opaque geometry. Defaults to true.