class_cubemaparray.rst 3.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/CubemapArray.xml.
  6. .. _class_CubemapArray:
  7. CubemapArray
  8. ============
  9. **Inherits:** :ref:`ImageTextureLayered<class_ImageTextureLayered>` **<** :ref:`TextureLayered<class_TextureLayered>` **<** :ref:`Texture<class_Texture>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  10. An array of :ref:`Cubemap<class_Cubemap>`\ s, stored together and with a single reference.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. **CubemapArray**\ s are made of an array of :ref:`Cubemap<class_Cubemap>`\ s. Like :ref:`Cubemap<class_Cubemap>`\ s, they are made of multiple textures, the amount of which must be divisible by 6 (one 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 :ref:`Cubemap<class_Cubemap>`\ s into a shader using a single **CubemapArray**.
  15. Moreover, :ref:`Cubemap<class_Cubemap>`\ s are allocated in adjacent cache regions on the GPU. This makes **CubemapArray**\ s the most efficient way to store multiple :ref:`Cubemap<class_Cubemap>`\ s.
  16. Internally, Godot uses **CubemapArray**\ s for many effects, including the :ref:`Sky<class_Sky>` if you set :ref:`ProjectSettings.rendering/reflections/sky_reflections/texture_array_reflections<class_ProjectSettings_property_rendering/reflections/sky_reflections/texture_array_reflections>` to ``true``.
  17. To create such a texture file yourself, reimport your image files using the import presets of the File System dock.
  18. \ **Note:** **CubemapArray** is not supported in the OpenGL 3 rendering backend.
  19. .. rst-class:: classref-reftable-group
  20. Methods
  21. -------
  22. .. table::
  23. :widths: auto
  24. +---------------------------------+---------------------------------------------------------------------------------------------+
  25. | :ref:`Resource<class_Resource>` | :ref:`create_placeholder<class_CubemapArray_method_create_placeholder>` **(** **)** |const| |
  26. +---------------------------------+---------------------------------------------------------------------------------------------+
  27. .. rst-class:: classref-section-separator
  28. ----
  29. .. rst-class:: classref-descriptions-group
  30. Method Descriptions
  31. -------------------
  32. .. _class_CubemapArray_method_create_placeholder:
  33. .. rst-class:: classref-method
  34. :ref:`Resource<class_Resource>` **create_placeholder** **(** **)** |const|
  35. Creates a placeholder version of this resource (:ref:`PlaceholderCubemapArray<class_PlaceholderCubemapArray>`).
  36. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  37. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  38. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  39. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  40. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  41. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  42. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`