0.2.0-dev Download ZIP
21 lines ·1.6 KB Raw
| 1 | <?xml version="1.0" encoding="UTF-8" ?> |
| 2 | <class name="Texture2DArray" inherits="ImageTextureLayered" api_type="core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> |
| 3 | <brief_description> |
| 4 | A single texture resource which consists of multiple, separate images. Each image has the same dimensions and number of mipmap levels. |
| 5 | </brief_description> |
| 6 | <description> |
| 7 | 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. |
| 8 | 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. |
| 9 | To create such a texture file yourself, reimport your image files using the Godot Editor import presets. To create a Texture2DArray from code, use [method ImageTextureLayered.create_from_images] on an instance of the Texture2DArray class. |
| 10 | </description> |
| 11 | <tutorials> |
| 12 | </tutorials> |
| 13 | <methods> |
| 14 | <method name="create_placeholder" qualifiers="const"> |
| 15 | <return type="Resource" /> |
| 16 | <description> |
| 17 | Creates a placeholder version of this resource ([PlaceholderTexture2DArray]). |
| 18 | </description> |
| 19 | </method> |
| 20 | </methods> |
| 21 | </class> |