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.

CompressedCubemapArray

繼承: CompressedTextureLayered < TextureLayered < Texture < Resource < RefCounted < Object

立方體貼圖紋理陣列(見 CubemapArray)。

說明

一種從 .ccubearray 檔案載入的立方體貼圖陣列。這種檔案格式是 Godot 內部使用的;它是通過匯入系統匯入其他影像格式建立的。CompressedCubemapArray 可以使用 4 種壓縮方法中的一種:

  • 無損(WebP 或 PNG,在 GPU 上不壓縮)

  • 有損(WebP,在 GPU 上不壓縮)

  • VRAM 壓縮(在 GPU 上壓縮)

  • VRAM 未壓縮(在 GPU 上不壓縮)

  • Basis Universal(在 GPU 上壓縮。與 VRAM 壓縮相比,檔案更小,但壓縮速度更慢、品質更低)

只有 VRAM 壓縮實際上減少了 GPU 上的記憶體使用。無損和有損壓縮方法將減少磁碟上所需的儲存空間,但它們不會減少 GPU 上的記憶體使用,因為紋理未經壓縮地被發送到 GPU。

使用 VRAM 壓縮還可以縮短載入時間,因為與使用無損或有損壓縮的紋理相比,VRAM 壓縮的紋理載入速度更快。VRAM 壓縮會表現出明顯的偽影,並且它旨在用於 3D 渲染,而不是 2D。

有關立方體貼圖陣列的一般說明,請參閱 CubemapArray。