diff --git a/doc/classes/CompressedCubemap.xml b/doc/classes/CompressedCubemap.xml index fbb0879fdcd..10ee2668977 100644 --- a/doc/classes/CompressedCubemap.xml +++ b/doc/classes/CompressedCubemap.xml @@ -1,8 +1,17 @@ + 6-sided texture typically used in 3D rendering, optionally compressed. + A cubemap that is loaded from a [code].ccube[/code] file. This file format is internal to Godot; it is created by importing other image formats with the import system. [CompressedCubemap] can use one of 4 compresson methods: + - Uncompressed (uncompressed on the GPU) + - Lossless (WebP or PNG, uncompressed on the GPU) + - Lossy (WebP, uncompressed on the GPU) + - VRAM Compressed (compressed on the GPU) + Only [b]VRAM Compressed[/b] actually reduces the memory usage on the GPU. The [b]Lossless[/b] and [b]Lossy[/b] compression methods will reduce the required storage on disk, but they will not reduce memory usage on the GPU as the texture is sent to the GPU uncompressed. + Using [b]VRAM Compressed[/b] also improves loading times, as VRAM-compressed textures are faster to load compared to textures using lossless or lossy compression. VRAM compression can exhibit noticeable artifacts and is intended to be used for 3D rendering, not 2D. + See [Cubemap] for a general description of cubemaps. diff --git a/doc/classes/CompressedCubemapArray.xml b/doc/classes/CompressedCubemapArray.xml index ff096cea470..4221241910e 100644 --- a/doc/classes/CompressedCubemapArray.xml +++ b/doc/classes/CompressedCubemapArray.xml @@ -1,8 +1,17 @@ + Array of 6-sided textures typically used in 3D rendering, optionally compressed. + A cubemap array that is loaded from a [code].ccubearray[/code] file. This file format is internal to Godot; it is created by importing other image formats with the import system. [CompressedCubemapArray] can use one of 4 compresson methods: + - Uncompressed (uncompressed on the GPU) + - Lossless (WebP or PNG, uncompressed on the GPU) + - Lossy (WebP, uncompressed on the GPU) + - VRAM Compressed (compressed on the GPU) + Only [b]VRAM Compressed[/b] actually reduces the memory usage on the GPU. The [b]Lossless[/b] and [b]Lossy[/b] compression methods will reduce the required storage on disk, but they will not reduce memory usage on the GPU as the texture is sent to the GPU uncompressed. + Using [b]VRAM Compressed[/b] also improves loading times, as VRAM-compressed textures are faster to load compared to textures using lossless or lossy compression. VRAM compression can exhibit noticeable artifacts and is intended to be used for 3D rendering, not 2D. + See [CubemapArray] for a general description of cubemap arrays. diff --git a/doc/classes/CompressedTexture2D.xml b/doc/classes/CompressedTexture2D.xml index f7464d89511..660062af7ba 100644 --- a/doc/classes/CompressedTexture2D.xml +++ b/doc/classes/CompressedTexture2D.xml @@ -1,10 +1,16 @@ - A [code].ctex[/code] texture. + Texture with 2 dimensions, optionally compressed. - A texture that is loaded from a [code].ctex[/code] file. + A texture that is loaded from a [code].ctex[/code] file. This file format is internal to Godot; it is created by importing other image formats with the import system. [CompressedTexture2D] can use one of 4 compression methods (including a lack of any compression): + - Uncompressed (uncompressed on the GPU) + - Lossless (WebP or PNG, uncompressed on the GPU) + - Lossy (WebP, uncompressed on the GPU) + - VRAM Compressed (compressed on the GPU) + Only [b]VRAM Compressed[/b] actually reduces the memory usage on the GPU. The [b]Lossless[/b] and [b]Lossy[/b] compression methods will reduce the required storage on disk, but they will not reduce memory usage on the GPU as the texture is sent to the GPU uncompressed. + Using [b]VRAM Compressed[/b] also improves loading times, as VRAM-compressed textures are faster to load compared to textures using lossless or lossy compression. VRAM compression can exhibit noticeable artifacts and is intended to be used for 3D rendering, not 2D. @@ -13,13 +19,13 @@ - Loads the texture from the given path. + Loads the texture from the specified [param path]. - The CompressedTexture's file path to a [code].ctex[/code] file. + The [CompressedTexture2D]'s file path to a [code].ctex[/code] file. diff --git a/doc/classes/CompressedTexture2DArray.xml b/doc/classes/CompressedTexture2DArray.xml index 0c751759afd..0bd894a2da4 100644 --- a/doc/classes/CompressedTexture2DArray.xml +++ b/doc/classes/CompressedTexture2DArray.xml @@ -1,8 +1,17 @@ + Array of 2-dimensional textures, optionally compressed. + A texture array that is loaded from a [code].ctexarray[/code] file. This file format is internal to Godot; it is created by importing other image formats with the import system. [CompressedTexture2DArray] can use one of 4 compresson methods: + - Uncompressed (uncompressed on the GPU) + - Lossless (WebP or PNG, uncompressed on the GPU) + - Lossy (WebP, uncompressed on the GPU) + - VRAM Compressed (compressed on the GPU) + Only [b]VRAM Compressed[/b] actually reduces the memory usage on the GPU. The [b]Lossless[/b] and [b]Lossy[/b] compression methods will reduce the required storage on disk, but they will not reduce memory usage on the GPU as the texture is sent to the GPU uncompressed. + Using [b]VRAM Compressed[/b] also improves loading times, as VRAM-compressed textures are faster to load compared to textures using lossless or lossy compression. VRAM compression can exhibit noticeable artifacts and is intended to be used for 3D rendering, not 2D. + See [Texture2DArray] for a general description of texture arrays. diff --git a/doc/classes/CompressedTexture3D.xml b/doc/classes/CompressedTexture3D.xml index 50bd0258613..b11583b6844 100644 --- a/doc/classes/CompressedTexture3D.xml +++ b/doc/classes/CompressedTexture3D.xml @@ -1,8 +1,12 @@ + Texture with 3 dimensions, optionally compressed. + [CompressedTexture3D] is the VRAM-compressed counterpart of [ImageTexture3D]. The file extension for [CompressedTexture3D] files is [code].ctex3d[/code]. This file format is internal to Godot; it is created by importing other image formats with the import system. + [CompressedTexture3D] uses VRAM compression, which allows to reduce memory usage on the GPU when rendering the texture. This also improves loading times, as VRAM-compressed textures are faster to load compared to textures using lossless compression. VRAM compression can exhibit noticeable artifacts and is intended to be used for 3D rendering, not 2D. + See [Texture3D] for a general description of 3D textures. @@ -11,11 +15,13 @@ + Loads the texture from the specified [param path]. + The [CompressedTexture3D]'s file path to a [code].ctex3d[/code] file. diff --git a/doc/classes/CompressedTextureLayered.xml b/doc/classes/CompressedTextureLayered.xml index 547679c0f01..376483ae5c1 100644 --- a/doc/classes/CompressedTextureLayered.xml +++ b/doc/classes/CompressedTextureLayered.xml @@ -1,8 +1,16 @@ + Base class for texture arrays that can optionally be compressed. + A texture array that is loaded from a [code].ctexarray[/code] file. This file format is internal to Godot; it is created by importing other image formats with the import system. [CompressedTexture2D] can use one of 4 compresson methods: + - Uncompressed (uncompressed on the GPU) + - Lossless (WebP or PNG, uncompressed on the GPU) + - Lossy (WebP, uncompressed on the GPU) + - VRAM Compressed (compressed on the GPU) + Only [b]VRAM Compressed[/b] actually reduces the memory usage on the GPU. The [b]Lossless[/b] and [b]Lossy[/b] compression methods will reduce the required storage on disk, but they will not reduce memory usage on the GPU as the texture is sent to the GPU uncompressed. + Using [b]VRAM Compressed[/b] also improves loading times, as VRAM-compressed textures are faster to load compared to textures using lossless or lossy compression. VRAM compression can exhibit noticeable artifacts and is intended to be used for 3D rendering, not 2D. @@ -11,11 +19,13 @@ + Loads the texture at [param path]. + The path the texture should be loaded from. diff --git a/doc/classes/Cubemap.xml b/doc/classes/Cubemap.xml index 0cdebeda953..46ddede9b14 100644 --- a/doc/classes/Cubemap.xml +++ b/doc/classes/Cubemap.xml @@ -4,8 +4,9 @@ 6-sided texture typically used in 3D rendering. - A cubemap is made of 6 textures organized in layers. They are typically used for faking reflections (see [ReflectionProbe]) in 3D rendering. It can be used to make an object look as if it's reflecting its surroundings. This usually delivers much better performance than other reflection methods. - This resource is typically used as a uniform in custom shaders. Few core Godot methods make use of Cubemap resources. + A cubemap is made of 6 textures organized in layers. They are typically used for faking reflections in 3D rendering (see [ReflectionProbe]). It can be used to make an object look as if it's reflecting its surroundings. This usually delivers much better performance than other reflection methods. + This resource is typically used as a uniform in custom shaders. Few core Godot methods make use of [Cubemap] resources. + To create such a texture file yourself, reimport your image files using the Godot Editor import presets. [b]Note:[/b] Godot doesn't support using cubemaps in a [PanoramaSkyMaterial]. You can use [url=https://danilw.github.io/GLSL-howto/cubemap_to_panorama_js/cubemap_to_panorama.html]this tool[/url] to convert a cubemap to an equirectangular sky map. diff --git a/doc/classes/CubemapArray.xml b/doc/classes/CubemapArray.xml index 07e401a13da..2fd55b66c66 100644 --- a/doc/classes/CubemapArray.xml +++ b/doc/classes/CubemapArray.xml @@ -5,8 +5,9 @@ [CubemapArray]s are made of an array of [Cubemap]s. Accordingly, like [Cubemap]s they are made of multiple textures the amount of which must be divisible by 6 (one image for each face of the cube). The primary benefit of [CubemapArray]s is that they can be accessed in shader code using a single texture reference. In other words, you can pass multiple [Cubemap]s into a shader using a single [CubemapArray]. - Generally, [CubemapArray]s provide a more efficient way for storing multiple [Cubemap]s, than storing multiple [Cubemap]s themselves in an array. - Internally Godot, uses [CubemapArray]s for many effects including the [Sky], if you set [member ProjectSettings.rendering/reflections/sky_reflections/texture_array_reflections] to [code]true[/code]. + Generally, [CubemapArray]s provide a more efficient way for storing multiple [Cubemap]s compared to storing multiple [Cubemap]s themselves in an array. + Internally, Godot uses [CubemapArray]s for many effects including the [Sky], if you set [member ProjectSettings.rendering/reflections/sky_reflections/texture_array_reflections] to [code]true[/code]. + To create such a texture file yourself, reimport your image files using the Godot Editor import presets. [b]Note:[/b] [CubemapArray] is not supported in the OpenGL 3 rendering backend. diff --git a/doc/classes/Image.xml b/doc/classes/Image.xml index bbd633819b4..be66b8a7b98 100644 --- a/doc/classes/Image.xml +++ b/doc/classes/Image.xml @@ -118,7 +118,7 @@ - Creates an empty image of given size and format. See [enum Format] constants. If [param use_mipmaps] is [code]true[/code] then generate mipmaps for this image. See the [method generate_mipmaps]. + Creates an empty image of given size and format. See [enum Format] constants. If [param use_mipmaps] is [code]true[/code], then generate mipmaps for this image. See the [method generate_mipmaps]. diff --git a/doc/classes/ImageTexture3D.xml b/doc/classes/ImageTexture3D.xml index 958c5f90f16..ee26a959aac 100644 --- a/doc/classes/ImageTexture3D.xml +++ b/doc/classes/ImageTexture3D.xml @@ -1,8 +1,11 @@ + Texture with 3 dimensions. + [ImageTexture3D] is a 3-dimensional [ImageTexture] that has a width, height, and depth. See also [ImageTextureLayered]. + 3D textures are typically used to store density maps for [FogMaterial], color correction LUTs for [Environment], vector fields for [GPUParticlesAttractorVectorField3D] and collision maps for [GPUParticlesCollisionSDF3D]. 3D textures can also be used in custom shaders. @@ -16,12 +19,14 @@ + Creates the [ImageTexture3D] with specified [param width], [param height], and [param depth]. See [enum Image.Format] for [param format] options. If [param use_mipmaps] is [code]true[/code], then generate mipmaps for the [ImageTexture3D]. + Replaces the texture's existing data with the layers specified in [code]data[/code]. The size of [code]data[/code] must match the parameters that were used for [method create]. In other words, the texture cannot be resized or have its format changed by calling [method update]. diff --git a/doc/classes/ImageTextureLayered.xml b/doc/classes/ImageTextureLayered.xml index f5786f070af..0aa1d65d5a9 100644 --- a/doc/classes/ImageTextureLayered.xml +++ b/doc/classes/ImageTextureLayered.xml @@ -1,8 +1,10 @@ + Base class for texture types which contain the data of multiple [ImageTexture]s. Each image is of the same size and format. + Base class for [Texture2DArray], [Cubemap] and [CubemapArray]. Cannot be used directly, but contains all the functions necessary for accessing the derived resource types. See also [Texture3D]. @@ -11,7 +13,7 @@ - Creates an [ImageTextureLayered] from an array of [Image]s. The first image decides the width, height, image format and mipmapping setting. The other images must have the same width, height, image format and mipmapping setting. + Creates an [ImageTextureLayered] from an array of [Image]s. See [method Image.create] for the expected data format. The first image decides the width, height, image format and mipmapping setting. The other images [i]must[/i] have the same width, height, image format and mipmapping setting. Each [Image] represents one [code]layer[/code]. @@ -23,7 +25,7 @@ Replaces the existing [Image] data at the given [code]layer[/code] with this new image. The given [Image] must have the same width, height, image format and mipmapping setting (a [code]bool[/code] value) as the rest of the referenced images. If the image format is unsupported, it will be decompressed and converted to a similar and supported [enum Image.Format]. - The update is immediate: synced with the draw. + The update is immediate: it's synchronized with drawing. diff --git a/doc/classes/PlaceholderCubemap.xml b/doc/classes/PlaceholderCubemap.xml index 3617c6ac2cc..0892b023a23 100644 --- a/doc/classes/PlaceholderCubemap.xml +++ b/doc/classes/PlaceholderCubemap.xml @@ -1,8 +1,12 @@ + Placeholder class for a cubemap texture. + This class is used when loading a project that uses a [Cubemap] subclass in 2 conditions: + - When running the project exported in dedicated server mode, only the texture's dimensions are kept (as they may be relied upon for gameplay purposes or positioning of other elements). This allows reducing the exported PCK's size significantly. + - When this subclass is missing due to using a different engine version or build (e.g. modules disabled). diff --git a/doc/classes/PlaceholderCubemapArray.xml b/doc/classes/PlaceholderCubemapArray.xml index 1fcf1e77955..c7a7e9154c7 100644 --- a/doc/classes/PlaceholderCubemapArray.xml +++ b/doc/classes/PlaceholderCubemapArray.xml @@ -1,8 +1,12 @@ + Placeholder class for a cubemap texture array. + This class is used when loading a project that uses a [CubemapArray] subclass in 2 conditions: + - When running the project exported in dedicated server mode, only the texture's dimensions are kept (as they may be relied upon for gameplay purposes or positioning of other elements). This allows reducing the exported PCK's size significantly. + - When this subclass is missing due to using a different engine version or build (e.g. modules disabled). diff --git a/doc/classes/PlaceholderMaterial.xml b/doc/classes/PlaceholderMaterial.xml index c66641d81c2..7febdc7a07c 100644 --- a/doc/classes/PlaceholderMaterial.xml +++ b/doc/classes/PlaceholderMaterial.xml @@ -1,8 +1,12 @@ + Placeholder class for a material. + This class is used when loading a project that uses a [Material] subclass in 2 conditions: + - When running the project exported in dedicated server mode, only the texture's dimensions are kept (as they may be relied upon for gameplay purposes or positioning of other elements). This allows reducing the exported PCK's size significantly. + - When this subclass is missing due to using a different engine version or build (e.g. modules disabled). diff --git a/doc/classes/PlaceholderMesh.xml b/doc/classes/PlaceholderMesh.xml index cc688816b6a..8021a57878c 100644 --- a/doc/classes/PlaceholderMesh.xml +++ b/doc/classes/PlaceholderMesh.xml @@ -1,13 +1,18 @@ + Placeholder class for a mesh. + This class is used when loading a project that uses a [Mesh] subclass in 2 conditions: + - When running the project exported in dedicated server mode, only the texture's dimensions are kept (as they may be relied upon for gameplay purposes or positioning of other elements). This allows reducing the exported PCK's size significantly. + - When this subclass is missing due to using a different engine version or build (e.g. modules disabled). + The smallest [AABB] enclosing this mesh in local space. diff --git a/doc/classes/PlaceholderTexture2D.xml b/doc/classes/PlaceholderTexture2D.xml index 5d8509ec77f..c889055e4d3 100644 --- a/doc/classes/PlaceholderTexture2D.xml +++ b/doc/classes/PlaceholderTexture2D.xml @@ -1,14 +1,19 @@ + Placeholder class for a 2-dimensional texture. + This class is used when loading a project that uses a [Texture2D] subclass in 2 conditions: + - When running the project exported in dedicated server mode, only the texture's dimensions are kept (as they may be relied upon for gameplay purposes or positioning of other elements). This allows reducing the exported PCK's size significantly. + - When this subclass is missing due to using a different engine version or build (e.g. modules disabled). + The texture's size (in pixels). diff --git a/doc/classes/PlaceholderTexture2DArray.xml b/doc/classes/PlaceholderTexture2DArray.xml index a502e5d334c..a749e8c0393 100644 --- a/doc/classes/PlaceholderTexture2DArray.xml +++ b/doc/classes/PlaceholderTexture2DArray.xml @@ -1,8 +1,12 @@ + Placeholder class for a 2-dimensional texture array. + This class is used when loading a project that uses a [Texture2D] subclass in 2 conditions: + - When running the project exported in dedicated server mode, only the texture's dimensions are kept (as they may be relied upon for gameplay purposes or positioning of other elements). This allows reducing the exported PCK's size significantly. + - When this subclass is missing due to using a different engine version or build (e.g. modules disabled). diff --git a/doc/classes/PlaceholderTexture3D.xml b/doc/classes/PlaceholderTexture3D.xml index d31e538307f..ccd3c94fc2f 100644 --- a/doc/classes/PlaceholderTexture3D.xml +++ b/doc/classes/PlaceholderTexture3D.xml @@ -1,13 +1,18 @@ + Placeholder class for a 3-dimensional texture. + This class is used when loading a project that uses a [Texture3D] subclass in 2 conditions: + - When running the project exported in dedicated server mode, only the texture's dimensions are kept (as they may be relied upon for gameplay purposes or positioning of other elements). This allows reducing the exported PCK's size significantly. + - When this subclass is missing due to using a different engine version or build (e.g. modules disabled). + The texture's size (in pixels). diff --git a/doc/classes/PlaceholderTextureLayered.xml b/doc/classes/PlaceholderTextureLayered.xml index 39af08473a6..8cc6dd606a9 100644 --- a/doc/classes/PlaceholderTextureLayered.xml +++ b/doc/classes/PlaceholderTextureLayered.xml @@ -1,15 +1,21 @@ + Placeholder class for a 2-dimensional texture array. + This class is used when loading a project that uses a [TextureLayered] subclass in 2 conditions: + - When running the project exported in dedicated server mode, only the texture's dimensions are kept (as they may be relied upon for gameplay purposes or positioning of other elements). This allows reducing the exported PCK's size significantly. + - When this subclass is missing due to using a different engine version or build (e.g. modules disabled). + The number of layers in the texture array. + The size of each texture layer (in pixels). diff --git a/doc/classes/Texture.xml b/doc/classes/Texture.xml index df6e0433dc9..86c9026fd19 100644 --- a/doc/classes/Texture.xml +++ b/doc/classes/Texture.xml @@ -1,8 +1,10 @@ + Base class for all texture types. + [Texture] is the base class for all texture types. Common texture types are [Texture2D] and [ImageTexture]. See also [Image]. diff --git a/doc/classes/Texture2D.xml b/doc/classes/Texture2D.xml index 3dd8c339b22..aac197090a2 100644 --- a/doc/classes/Texture2D.xml +++ b/doc/classes/Texture2D.xml @@ -19,6 +19,8 @@ + Called when the entire [Texture2D] is requested to be drawn over a [CanvasItem], with the top-left offset specified in [param pos]. [param modulate] specifies a multiplier for the colors being drawn, while [param transpose] specifies whether drawing should be performed in column-major order instead of row-major order (resulting in 90-degree clockwise rotation). + [b]Note:[/b] This is only used in 2D rendering, not 3D. @@ -29,6 +31,8 @@ + Called when the [Texture2D] is requested to be drawn onto [CanvasItem]'s specified [param rect]. [param modulate] specifies a multiplier for the colors being drawn, while [param transpose] specifies whether drawing should be performed in column-major order instead of row-major order (resulting in 90-degree clockwise rotation). + [b]Note:[/b] This is only used in 2D rendering, not 3D. @@ -40,21 +44,26 @@ + Called when a part of the [Texture2D] specified by [param src_rect]'s coordinates is requested to be drawn onto [CanvasItem]'s specified [param rect]. [param modulate] specifies a multiplier for the colors being drawn, while [param transpose] specifies whether drawing should be performed in column-major order instead of row-major order (resulting in 90-degree clockwise rotation). + [b]Note:[/b] This is only used in 2D rendering, not 3D. + Called when the [Texture2D]'s height is queried. + Called when the [Texture2D]'s width is queried. + Called when the presence of an alpha channel in the [Texture2D] is queried. @@ -62,6 +71,7 @@ + Called when a pixel's opaque state in the [Texture2D] is queried at the specified [code](x, y)[/code] position. @@ -100,7 +110,7 @@ - Returns the texture height. + Returns the texture height in pixels. @@ -113,13 +123,13 @@ - Returns the texture size. + Returns the texture size in pixels. - Returns the texture width. + Returns the texture width in pixels. diff --git a/doc/classes/Texture2DArray.xml b/doc/classes/Texture2DArray.xml index 113f37f9743..ec00198db17 100644 --- a/doc/classes/Texture2DArray.xml +++ b/doc/classes/Texture2DArray.xml @@ -4,8 +4,9 @@ A single texture resource which consists of multiple, separate images. Each image has the same dimensions and number of mipmap levels. - A Texture2DArray is different from a Texture3D: The Texture2DArray does not support trilinear interpolation between the [Image]s, i.e. no blending. + A Texture2DArray is different from a Texture3D: The Texture2DArray does not support trilinear interpolation between the [Image]s, i.e. no blending. See also [Cubemap] and [CubemapArray], which are texture arrays with specialized cubemap functions. A Texture2DArray is also different from an [AtlasTexture]: In a Texture2DArray, all images are treated separately. In an atlas, the regions (i.e. the single images) can be of different sizes. Furthermore, you usually need to add a padding around the regions, to prevent accidental UV mapping to more than one region. The same goes for mipmapping: Mipmap chains are handled separately for each layer. In an atlas, the slicing has to be done manually in the fragment shader. + To create such a texture file yourself, reimport your image files using the Godot Editor import presets. diff --git a/doc/classes/Texture3D.xml b/doc/classes/Texture3D.xml index 4968f46fe87..1a66932d621 100644 --- a/doc/classes/Texture3D.xml +++ b/doc/classes/Texture3D.xml @@ -1,8 +1,12 @@ + Base class for 3-dimensionnal textures. + Base class for [ImageTexture3D] and [CompressedTexture3D]. Cannot be used directly, but contains all the functions necessary for accessing the derived resource types. [Texture3D] is the base class for all 3-dimensional texture types. See also [TextureLayered]. + All images need to have the same width, height and number of mipmap levels. + To create such a texture file yourself, reimport your image files using the Godot Editor import presets. @@ -10,61 +14,73 @@ + Called when the [Texture3D]'s data is queried. + Called when the [Texture3D]'s depth is queried. + Called when the [Texture3D]'s format is queried. + Called when the [Texture3D]'s height is queried. + Called when the [Texture3D]'s width is queried. + Called when the presence of mipmaps in the [Texture3D] is queried. + Returns the [Texture3D]'s data as an array of [Image]s. Each [Image] represents a [i]slice[/i] of the [Texture3D], with different slices mapping to different depth (Z axis) levels. + Returns the [Texture3D]'s depth in pixels. Depth is typically represented by the Z axis (a dimension not present in [Texture2D]). + Returns the current format being used by this texture. See [enum Image.Format] for details. + Returns the [Texture3D]'s height in pixels. Width is typically represented by the Y axis. + Returns the [Texture3D]'s width in pixels. Width is typically represented by the X axis. + Returns [code]true[/code] if the [Texture3D] has generated mipmaps. diff --git a/doc/classes/TextureLayered.xml b/doc/classes/TextureLayered.xml index 5e6afcbc5c4..8f6dff7acfe 100644 --- a/doc/classes/TextureLayered.xml +++ b/doc/classes/TextureLayered.xml @@ -4,12 +4,11 @@ Base class for texture types which contain the data of multiple [Image]s. Each image is of the same size and format. - Base class for [Texture2DArray], [Cubemap] and [CubemapArray]. Cannot be used directly, but contains all the functions necessary for accessing the derived resource types. + Base class for [ImageTextureLayered]. Cannot be used directly, but contains all the functions necessary for accessing the derived resource types. See also [Texture3D]. Data is set on a per-layer basis. For [Texture2DArray]s, the layer specifies the array layer. All images need to have the same width, height and number of mipmap levels. - A [TextureLayered] can be loaded with [code]method ResourceFormatLoader.load[/code]. - To create such a texture file yourself, re-import your image files using the Godot Editor import presets. - Internally, Godot maps these files to their respective counterparts in the target rendering driver (GLES3, Vulkan). + A [TextureLayered] can be loaded with [method ResourceLoader.load]. + Internally, Godot maps these files to their respective counterparts in the target rendering driver (Vulkan, GLES3). @@ -17,37 +16,44 @@ + Called when the [TextureLayered]'s format is queried. + Called when the the [TextureLayered]'s height is queried. + Called when the data for a layer in the [TextureLayered] is queried. + Called when the layers' type in the [TextureLayered] is queried. + Called when the number of layers in the [TextureLayered] is queried. + Called when the [TextureLayered]'s width queried. + Called when the presence of mipmaps in the [TextureLayered] is queried. @@ -59,7 +65,7 @@ - Returns the height of the texture. Height is typically represented by the Y-axis. + Returns the height of the texture in pixels. Height is typically represented by the Y axis. @@ -72,6 +78,7 @@ + Returns the [TextureLayered]'s type. The type determines how the data is accessed, with cubemaps having special types. @@ -83,7 +90,7 @@ - Returns the width of the texture. Width is typically represented by the X-axis. + Returns the width of the texture in pixels. Width is typically represented by the X axis. @@ -95,10 +102,13 @@ + Texture is a generic [Texture2DArray]. + Texture is a [Cubemap], with each side in its own layer (6 in total). + Texture is a [CubemapArray], with each cubemap being made of 6 layers.