12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- :github_url: hide
- .. DO NOT EDIT THIS FILE!!!
- .. Generated automatically from Godot engine sources.
- .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
- .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/ImageTexture3D.xml.
- .. _class_ImageTexture3D:
- ImageTexture3D
- ==============
- **Inherits:** :ref:`Texture3D<class_Texture3D>` **<** :ref:`Texture<class_Texture>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
- Texture with 3 dimensions.
- .. rst-class:: classref-introduction-group
- Description
- -----------
- **ImageTexture3D** is a 3-dimensional :ref:`ImageTexture<class_ImageTexture>` that has a width, height, and depth. See also :ref:`ImageTextureLayered<class_ImageTextureLayered>`.
- 3D textures are typically used to store density maps for :ref:`FogMaterial<class_FogMaterial>`, color correction LUTs for :ref:`Environment<class_Environment>`, vector fields for :ref:`GPUParticlesAttractorVectorField3D<class_GPUParticlesAttractorVectorField3D>` and collision maps for :ref:`GPUParticlesCollisionSDF3D<class_GPUParticlesCollisionSDF3D>`. 3D textures can also be used in custom shaders.
- .. rst-class:: classref-reftable-group
- Methods
- -------
- .. table::
- :widths: auto
- +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`create<class_ImageTexture3D_method_create>` **(** :ref:`Format<enum_Image_Format>` format, :ref:`int<class_int>` width, :ref:`int<class_int>` height, :ref:`int<class_int>` depth, :ref:`bool<class_bool>` use_mipmaps, :ref:`Image[]<class_Image>` data **)** |
- +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`update<class_ImageTexture3D_method_update>` **(** :ref:`Image[]<class_Image>` data **)** |
- +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- .. rst-class:: classref-section-separator
- ----
- .. rst-class:: classref-descriptions-group
- Method Descriptions
- -------------------
- .. _class_ImageTexture3D_method_create:
- .. rst-class:: classref-method
- :ref:`Error<enum_@GlobalScope_Error>` **create** **(** :ref:`Format<enum_Image_Format>` format, :ref:`int<class_int>` width, :ref:`int<class_int>` height, :ref:`int<class_int>` depth, :ref:`bool<class_bool>` use_mipmaps, :ref:`Image[]<class_Image>` data **)**
- Creates the **ImageTexture3D** with specified ``width``, ``height``, and ``depth``. See :ref:`Format<enum_Image_Format>` for ``format`` options. If ``use_mipmaps`` is ``true``, then generate mipmaps for the **ImageTexture3D**.
- .. rst-class:: classref-item-separator
- ----
- .. _class_ImageTexture3D_method_update:
- .. rst-class:: classref-method
- void **update** **(** :ref:`Image[]<class_Image>` data **)**
- Replaces the texture's existing data with the layers specified in ``data``. The size of ``data`` must match the parameters that were used for :ref:`create<class_ImageTexture3D_method_create>`. In other words, the texture cannot be resized or have its format changed by calling :ref:`update<class_ImageTexture3D_method_update>`.
- .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
- .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
- .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
- .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
- .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
- .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
- .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|