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...
CubemapArray¶
继承: ImageTextureLayered < TextureLayered < Texture < Resource < RefCounted < Object
Cubemap 数组,存储在一起并使用单个引用。
描述¶
CubemapArray 由一组 Cubemap 组成。它们像 Cubemap 一样是由多个纹理组成的,其纹理的数量必须能被 6 整除(立方体的每个面都有一个)。CubemapArray 的主要好处是可以使用单个纹理引用在着色器代码中访问它们。换句话说,可以使用单个 CubemapArray 将多个 Cubemap 传入着色器。
此外,Cubemap 被分配在 GPU 上相邻的缓存区块中。这使得 CubemapArray 成为存储多个 Cubemap 的最有效方式。
如果将 ProjectSettings.rendering/reflections/sky_reflections/texture_array_reflections 设置为 true
,Godot 在内部会将 CubemapArray 用于多种效果,包括 Sky。
要想自己创建这样的纹理文件,请使用文件系统停靠面板的导入预设重新导入你的图像文件。
注意:CubemapArray 在 OpenGL 3 渲染后端中不受支持。
方法¶
create_placeholder ( ) const |
方法说明¶
Resource create_placeholder ( ) const
创建该资源的占位符版本(PlaceholderCubemapArray)。