class_fogmaterial.rst 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  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/FogMaterial.xml.
  6. .. _class_FogMaterial:
  7. FogMaterial
  8. ===========
  9. **Inherits:** :ref:`Material<class_Material>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  10. A material that controls how volumetric fog is rendered, to be assigned to a :ref:`FogVolume<class_FogVolume>`.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. A :ref:`Material<class_Material>` resource that can be used by :ref:`FogVolume<class_FogVolume>`\ s to draw volumetric effects.
  15. If you need more advanced effects, use a custom :doc:`fog shader <../tutorials/shaders/shader_reference/fog_shader>`.
  16. .. rst-class:: classref-reftable-group
  17. Properties
  18. ----------
  19. .. table::
  20. :widths: auto
  21. +-----------------------------------+--------------------------------------------------------------------+-----------------------+
  22. | :ref:`Color<class_Color>` | :ref:`albedo<class_FogMaterial_property_albedo>` | ``Color(1, 1, 1, 1)`` |
  23. +-----------------------------------+--------------------------------------------------------------------+-----------------------+
  24. | :ref:`float<class_float>` | :ref:`density<class_FogMaterial_property_density>` | ``1.0`` |
  25. +-----------------------------------+--------------------------------------------------------------------+-----------------------+
  26. | :ref:`Texture3D<class_Texture3D>` | :ref:`density_texture<class_FogMaterial_property_density_texture>` | |
  27. +-----------------------------------+--------------------------------------------------------------------+-----------------------+
  28. | :ref:`float<class_float>` | :ref:`edge_fade<class_FogMaterial_property_edge_fade>` | ``0.1`` |
  29. +-----------------------------------+--------------------------------------------------------------------+-----------------------+
  30. | :ref:`Color<class_Color>` | :ref:`emission<class_FogMaterial_property_emission>` | ``Color(0, 0, 0, 1)`` |
  31. +-----------------------------------+--------------------------------------------------------------------+-----------------------+
  32. | :ref:`float<class_float>` | :ref:`height_falloff<class_FogMaterial_property_height_falloff>` | ``0.0`` |
  33. +-----------------------------------+--------------------------------------------------------------------+-----------------------+
  34. .. rst-class:: classref-section-separator
  35. ----
  36. .. rst-class:: classref-descriptions-group
  37. Property Descriptions
  38. ---------------------
  39. .. _class_FogMaterial_property_albedo:
  40. .. rst-class:: classref-property
  41. :ref:`Color<class_Color>` **albedo** = ``Color(1, 1, 1, 1)`` :ref:`🔗<class_FogMaterial_property_albedo>`
  42. .. rst-class:: classref-property-setget
  43. - |void| **set_albedo**\ (\ value\: :ref:`Color<class_Color>`\ )
  44. - :ref:`Color<class_Color>` **get_albedo**\ (\ )
  45. The single-scattering :ref:`Color<class_Color>` of the :ref:`FogVolume<class_FogVolume>`. Internally, :ref:`albedo<class_FogMaterial_property_albedo>` is converted into single-scattering, which is additively blended with other :ref:`FogVolume<class_FogVolume>`\ s and the :ref:`Environment.volumetric_fog_albedo<class_Environment_property_volumetric_fog_albedo>`.
  46. .. rst-class:: classref-item-separator
  47. ----
  48. .. _class_FogMaterial_property_density:
  49. .. rst-class:: classref-property
  50. :ref:`float<class_float>` **density** = ``1.0`` :ref:`🔗<class_FogMaterial_property_density>`
  51. .. rst-class:: classref-property-setget
  52. - |void| **set_density**\ (\ value\: :ref:`float<class_float>`\ )
  53. - :ref:`float<class_float>` **get_density**\ (\ )
  54. The density of the :ref:`FogVolume<class_FogVolume>`. Denser objects are more opaque, but may suffer from under-sampling artifacts that look like stripes. Negative values can be used to subtract fog from other :ref:`FogVolume<class_FogVolume>`\ s or global volumetric fog.
  55. \ **Note:** Due to limited precision, :ref:`density<class_FogMaterial_property_density>` values between ``-0.001`` and ``0.001`` (exclusive) act like ``0.0``. This does not apply to :ref:`Environment.volumetric_fog_density<class_Environment_property_volumetric_fog_density>`.
  56. .. rst-class:: classref-item-separator
  57. ----
  58. .. _class_FogMaterial_property_density_texture:
  59. .. rst-class:: classref-property
  60. :ref:`Texture3D<class_Texture3D>` **density_texture** :ref:`🔗<class_FogMaterial_property_density_texture>`
  61. .. rst-class:: classref-property-setget
  62. - |void| **set_density_texture**\ (\ value\: :ref:`Texture3D<class_Texture3D>`\ )
  63. - :ref:`Texture3D<class_Texture3D>` **get_density_texture**\ (\ )
  64. The 3D texture that is used to scale the :ref:`density<class_FogMaterial_property_density>` of the :ref:`FogVolume<class_FogVolume>`. This can be used to vary fog density within the :ref:`FogVolume<class_FogVolume>` with any kind of static pattern. For animated effects, consider using a custom :doc:`fog shader <../tutorials/shaders/shader_reference/fog_shader>`.
  65. .. rst-class:: classref-item-separator
  66. ----
  67. .. _class_FogMaterial_property_edge_fade:
  68. .. rst-class:: classref-property
  69. :ref:`float<class_float>` **edge_fade** = ``0.1`` :ref:`🔗<class_FogMaterial_property_edge_fade>`
  70. .. rst-class:: classref-property-setget
  71. - |void| **set_edge_fade**\ (\ value\: :ref:`float<class_float>`\ )
  72. - :ref:`float<class_float>` **get_edge_fade**\ (\ )
  73. The hardness of the edges of the :ref:`FogVolume<class_FogVolume>`. A higher value will result in softer edges, while a lower value will result in harder edges.
  74. .. rst-class:: classref-item-separator
  75. ----
  76. .. _class_FogMaterial_property_emission:
  77. .. rst-class:: classref-property
  78. :ref:`Color<class_Color>` **emission** = ``Color(0, 0, 0, 1)`` :ref:`🔗<class_FogMaterial_property_emission>`
  79. .. rst-class:: classref-property-setget
  80. - |void| **set_emission**\ (\ value\: :ref:`Color<class_Color>`\ )
  81. - :ref:`Color<class_Color>` **get_emission**\ (\ )
  82. The :ref:`Color<class_Color>` of the light emitted by the :ref:`FogVolume<class_FogVolume>`. Emitted light will not cast light or shadows on other objects, but can be useful for modulating the :ref:`Color<class_Color>` of the :ref:`FogVolume<class_FogVolume>` independently from light sources.
  83. .. rst-class:: classref-item-separator
  84. ----
  85. .. _class_FogMaterial_property_height_falloff:
  86. .. rst-class:: classref-property
  87. :ref:`float<class_float>` **height_falloff** = ``0.0`` :ref:`🔗<class_FogMaterial_property_height_falloff>`
  88. .. rst-class:: classref-property-setget
  89. - |void| **set_height_falloff**\ (\ value\: :ref:`float<class_float>`\ )
  90. - :ref:`float<class_float>` **get_height_falloff**\ (\ )
  91. The rate by which the height-based fog decreases in density as height increases in world space. A high falloff will result in a sharp transition, while a low falloff will result in a smoother transition. A value of ``0.0`` results in uniform-density fog. The height threshold is determined by the height of the associated :ref:`FogVolume<class_FogVolume>`.
  92. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  93. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  94. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  95. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  96. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  97. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  98. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  99. .. |void| replace:: :abbr:`void (No return value.)`