Up to date

This page is up to date for Godot 4.2. If you still find outdated information, please open an issue.

Cubemap

继承: ImageTextureLayered < TextureLayered < Texture < Resource < RefCounted < Object

代表立方体面的六个正方形纹理。通常用作天空盒。

描述

单个立方体贴图是由 6 个纹理分层组织的纹理组成的。它们通常用于在 3D 渲染中伪造反射(参见 ReflectionProbe)。可以用来让对象看起来像是在反射它的周围环境。与其他反射方法相比,这通常能提供更好的性能。

这种资源通常在自定义着色器中用作一个 uniform。很少有 Godot 的核心方法会使用 Cubemap 资源。

要想自己创建这样的纹理文件,请使用 Godot 编辑器的导入预设重新导入你的图像文件。

注意:Godot 不支持在 PanoramaSkyMaterial 中使用立方体贴图。可以使用这个工具将立方体贴图转换为等距柱状天空贴图。

方法

Resource

create_placeholder ( ) const


方法说明

Resource create_placeholder ( ) const

创建该资源的占位符版本(PlaceholderCubemap)。