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 的变换。