Files
godot-docs/classes/class_panoramaskymaterial.rst
2025-06-07 03:33:02 +00:00

109 lines
4.8 KiB
ReStructuredText

: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/PanoramaSkyMaterial.xml.
.. _class_PanoramaSkyMaterial:
PanoramaSkyMaterial
===================
**Inherits:** :ref:`Material<class_Material>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
A material that provides a special texture to a :ref:`Sky<class_Sky>`, usually an HDR panorama.
.. rst-class:: classref-introduction-group
Description
-----------
A resource referenced in a :ref:`Sky<class_Sky>` that is used to draw a background. **PanoramaSkyMaterial** functions similar to skyboxes in other engines, except it uses an equirectangular sky map instead of a :ref:`Cubemap<class_Cubemap>`.
Using an HDR panorama is strongly recommended for accurate, high-quality reflections. Godot supports the Radiance HDR (``.hdr``) and OpenEXR (``.exr``) image formats for this purpose.
You can use `this tool <https://danilw.github.io/GLSL-howto/cubemap_to_panorama_js/cubemap_to_panorama.html>`__ to convert a cubemap to an equirectangular sky map.
.. rst-class:: classref-reftable-group
Properties
----------
.. table::
:widths: auto
+-----------------------------------+--------------------------------------------------------------------------------+----------+
| :ref:`float<class_float>` | :ref:`energy_multiplier<class_PanoramaSkyMaterial_property_energy_multiplier>` | ``1.0`` |
+-----------------------------------+--------------------------------------------------------------------------------+----------+
| :ref:`bool<class_bool>` | :ref:`filter<class_PanoramaSkyMaterial_property_filter>` | ``true`` |
+-----------------------------------+--------------------------------------------------------------------------------+----------+
| :ref:`Texture2D<class_Texture2D>` | :ref:`panorama<class_PanoramaSkyMaterial_property_panorama>` | |
+-----------------------------------+--------------------------------------------------------------------------------+----------+
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Property Descriptions
---------------------
.. _class_PanoramaSkyMaterial_property_energy_multiplier:
.. rst-class:: classref-property
:ref:`float<class_float>` **energy_multiplier** = ``1.0`` :ref:`🔗<class_PanoramaSkyMaterial_property_energy_multiplier>`
.. rst-class:: classref-property-setget
- |void| **set_energy_multiplier**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_energy_multiplier**\ (\ )
The sky's overall brightness multiplier. Higher values result in a brighter sky.
.. rst-class:: classref-item-separator
----
.. _class_PanoramaSkyMaterial_property_filter:
.. rst-class:: classref-property
:ref:`bool<class_bool>` **filter** = ``true`` :ref:`🔗<class_PanoramaSkyMaterial_property_filter>`
.. rst-class:: classref-property-setget
- |void| **set_filtering_enabled**\ (\ value\: :ref:`bool<class_bool>`\ )
- :ref:`bool<class_bool>` **is_filtering_enabled**\ (\ )
A boolean value to determine if the background texture should be filtered or not.
.. rst-class:: classref-item-separator
----
.. _class_PanoramaSkyMaterial_property_panorama:
.. rst-class:: classref-property
:ref:`Texture2D<class_Texture2D>` **panorama** :ref:`🔗<class_PanoramaSkyMaterial_property_panorama>`
.. rst-class:: classref-property-setget
- |void| **set_panorama**\ (\ value\: :ref:`Texture2D<class_Texture2D>`\ )
- :ref:`Texture2D<class_Texture2D>` **get_panorama**\ (\ )
:ref:`Texture2D<class_Texture2D>` to be applied to the **PanoramaSkyMaterial**.
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
.. |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.)`
.. |void| replace:: :abbr:`void (No return value.)`