GpuInstance¶
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 shader entry points and helpers reached from them; using them elsewhere is a compile error.
GpuInstance¶
One placed copy of a bottom-level acceleration structure inside a top-level one. Start from GpuInstance(...) and chain the settings you want to change.
constructor¶
Places a bottom-level acceleration structure with the supplied object-to-world transform.
with_id¶
Sets the value hit shaders read with hit_instance_id(), and returns this instance.
with_mask¶
Sets the 8-bit visibility mask, and returns this instance. A ray only sees instances whose mask shares a bit with the ray's mask. Defaults to 255.
with_hit_group¶
Sets which hit group of the ray tracing pipeline handles hits on this instance, and returns this instance. Defaults to 0.