Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
RDAccelerationStructureInstance
實驗性: This class may be changed or removed in future versions.
繼承: RefCounted < Object
加速結構實例(由 RenderingDevice 使用)。
說明
RDAccelerationStructureInstance 描述了在 RenderingDevice.tlas_build() 方法中使用的底層加速結構(Bottom-Level Acceleration Structure,簡稱 BLAS)的一個實例。
屬性
|
||
BitField[AccelerationStructureInstanceFlagBits] |
|
|
|
||
|
||
|
||
|
屬性說明
該實例所參照的底層加速結構(BLAS)。如果為 null,則該實例被視為一個佔位符,但在 GLSL 中仍然會參與計算 gl_InstanceIndex。
BitField[AccelerationStructureInstanceFlagBits] flags = 0 🔗
void set_flags(value: BitField[AccelerationStructureInstanceFlagBits])
BitField[AccelerationStructureInstanceFlagBits] get_flags()
實例的標誌位。
用於該實例的命中著色器綁定表範圍,該範圍使用 RenderingDevice.hit_sbt_range_alloc() 方法進行分配。
自訂實例 ID,可在 GLSL 中通過 gl_InstanceCustomIndexEXT 進行存取。
用於控制哪些光線可以與此實例相交的可見性遮罩。
Transform3D transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0) 🔗
void set_transform(value: Transform3D)
Transform3D get_transform()
套用至該實例所參照的 BLAS 的變換。