classref: Sync with current master branch (34f005d)

This commit is contained in:
Godot Organization
2025-05-17 03:29:03 +00:00
parent 7729a1ff7d
commit 28581094f5
12 changed files with 295 additions and 39 deletions
+62 -2
View File
@@ -77,6 +77,10 @@ Properties
+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
| :ref:`Texture2D<class_Texture2D>` | :ref:`backlight_texture<class_BaseMaterial3D_property_backlight_texture>` | |
+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
| :ref:`bool<class_bool>` | :ref:`bent_normal_enabled<class_BaseMaterial3D_property_bent_normal_enabled>` | ``false`` |
+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
| :ref:`Texture2D<class_Texture2D>` | :ref:`bent_normal_texture<class_BaseMaterial3D_property_bent_normal_texture>` | |
+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
| :ref:`bool<class_bool>` | :ref:`billboard_keep_scale<class_BaseMaterial3D_property_billboard_keep_scale>` | ``false`` |
+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
| :ref:`BillboardMode<enum_BaseMaterial3D_BillboardMode>` | :ref:`billboard_mode<class_BaseMaterial3D_property_billboard_mode>` | ``0`` |
@@ -353,6 +357,14 @@ Texture specifying per-pixel emission color.
Texture specifying per-pixel normal vector.
.. _class_BaseMaterial3D_constant_TEXTURE_BENT_NORMAL:
.. rst-class:: classref-enumeration-constant
:ref:`TextureParam<enum_BaseMaterial3D_TextureParam>` **TEXTURE_BENT_NORMAL** = ``18``
Texture specifying per-pixel bent normal vector.
.. _class_BaseMaterial3D_constant_TEXTURE_RIM:
.. rst-class:: classref-enumeration-constant
@@ -461,7 +473,7 @@ Texture holding ambient occlusion, roughness, and metallic.
.. rst-class:: classref-enumeration-constant
:ref:`TextureParam<enum_BaseMaterial3D_TextureParam>` **TEXTURE_MAX** = ``18``
:ref:`TextureParam<enum_BaseMaterial3D_TextureParam>` **TEXTURE_MAX** = ``19``
Represents the size of the :ref:`TextureParam<enum_BaseMaterial3D_TextureParam>` enum.
@@ -763,11 +775,19 @@ Constant for setting :ref:`refraction_enabled<class_BaseMaterial3D_property_refr
Constant for setting :ref:`detail_enabled<class_BaseMaterial3D_property_detail_enabled>`.
.. _class_BaseMaterial3D_constant_FEATURE_BENT_NORMAL_MAPPING:
.. rst-class:: classref-enumeration-constant
:ref:`Feature<enum_BaseMaterial3D_Feature>` **FEATURE_BENT_NORMAL_MAPPING** = ``12``
Constant for setting :ref:`bent_normal_enabled<class_BaseMaterial3D_property_bent_normal_enabled>`.
.. _class_BaseMaterial3D_constant_FEATURE_MAX:
.. rst-class:: classref-enumeration-constant
:ref:`Feature<enum_BaseMaterial3D_Feature>` **FEATURE_MAX** = ``12``
:ref:`Feature<enum_BaseMaterial3D_Feature>` **FEATURE_MAX** = ``13``
Represents the size of the :ref:`Feature<enum_BaseMaterial3D_Feature>` enum.
@@ -1715,6 +1735,46 @@ Texture used to control the backlight effect per-pixel. Added to :ref:`backlight
----
.. _class_BaseMaterial3D_property_bent_normal_enabled:
.. rst-class:: classref-property
:ref:`bool<class_bool>` **bent_normal_enabled** = ``false`` :ref:`🔗<class_BaseMaterial3D_property_bent_normal_enabled>`
.. rst-class:: classref-property-setget
- |void| **set_feature**\ (\ feature\: :ref:`Feature<enum_BaseMaterial3D_Feature>`, enable\: :ref:`bool<class_bool>`\ )
- :ref:`bool<class_bool>` **get_feature**\ (\ feature\: :ref:`Feature<enum_BaseMaterial3D_Feature>`\ ) |const|
If ``true``, the bent normal map is enabled. This allows for more accurate indirect lighting and specular occlusion.
.. rst-class:: classref-item-separator
----
.. _class_BaseMaterial3D_property_bent_normal_texture:
.. rst-class:: classref-property
:ref:`Texture2D<class_Texture2D>` **bent_normal_texture** :ref:`🔗<class_BaseMaterial3D_property_bent_normal_texture>`
.. rst-class:: classref-property-setget
- |void| **set_texture**\ (\ param\: :ref:`TextureParam<enum_BaseMaterial3D_TextureParam>`, texture\: :ref:`Texture2D<class_Texture2D>`\ )
- :ref:`Texture2D<class_Texture2D>` **get_texture**\ (\ param\: :ref:`TextureParam<enum_BaseMaterial3D_TextureParam>`\ ) |const|
Texture that specifies the average direction of incoming ambient light at a given pixel. The :ref:`bent_normal_texture<class_BaseMaterial3D_property_bent_normal_texture>` only uses the red and green channels; the blue and alpha channels are ignored. The normal read from :ref:`bent_normal_texture<class_BaseMaterial3D_property_bent_normal_texture>` is oriented around the surface normal provided by the :ref:`Mesh<class_Mesh>`.
\ **Note:** A bent normal map is different from a regular normal map. When baking a bent normal map make sure to use **a cosine distribution** for the bent normal map to work correctly.
\ **Note:** The mesh must have both normals and tangents defined in its vertex data. Otherwise, the shading produced by the bent normal map will not look correct. If creating geometry with :ref:`SurfaceTool<class_SurfaceTool>`, you can use :ref:`SurfaceTool.generate_normals()<class_SurfaceTool_method_generate_normals>` and :ref:`SurfaceTool.generate_tangents()<class_SurfaceTool_method_generate_tangents>` to automatically generate normals and tangents respectively.
\ **Note:** Godot expects the bent normal map to use X+, Y+, and Z+ coordinates. See `this page <http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates>`__ for a comparison of normal map coordinates expected by popular engines.
.. rst-class:: classref-item-separator
----
.. _class_BaseMaterial3D_property_billboard_keep_scale:
.. rst-class:: classref-property