class_fogmaterial.rst 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  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. :ref:`Material<class_Material>` used with a :ref:`FogVolume<class_FogVolume>` to draw things with the volumetric fog effect.
  11. Description
  12. -----------
  13. A :ref:`Material<class_Material>` resource that can be used by :ref:`FogVolume<class_FogVolume>`\ s to draw volumetric effects.
  14. Properties
  15. ----------
  16. +-----------------------------------+--------------------------------------------------------------------+-----------------------+
  17. | :ref:`Color<class_Color>` | :ref:`albedo<class_FogMaterial_property_albedo>` | ``Color(1, 1, 1, 1)`` |
  18. +-----------------------------------+--------------------------------------------------------------------+-----------------------+
  19. | :ref:`float<class_float>` | :ref:`density<class_FogMaterial_property_density>` | ``1.0`` |
  20. +-----------------------------------+--------------------------------------------------------------------+-----------------------+
  21. | :ref:`Texture3D<class_Texture3D>` | :ref:`density_texture<class_FogMaterial_property_density_texture>` | |
  22. +-----------------------------------+--------------------------------------------------------------------+-----------------------+
  23. | :ref:`float<class_float>` | :ref:`edge_fade<class_FogMaterial_property_edge_fade>` | ``0.1`` |
  24. +-----------------------------------+--------------------------------------------------------------------+-----------------------+
  25. | :ref:`Color<class_Color>` | :ref:`emission<class_FogMaterial_property_emission>` | ``Color(0, 0, 0, 1)`` |
  26. +-----------------------------------+--------------------------------------------------------------------+-----------------------+
  27. | :ref:`float<class_float>` | :ref:`height_falloff<class_FogMaterial_property_height_falloff>` | ``0.0`` |
  28. +-----------------------------------+--------------------------------------------------------------------+-----------------------+
  29. Property Descriptions
  30. ---------------------
  31. .. _class_FogMaterial_property_albedo:
  32. - :ref:`Color<class_Color>` **albedo**
  33. +-----------+-----------------------+
  34. | *Default* | ``Color(1, 1, 1, 1)`` |
  35. +-----------+-----------------------+
  36. | *Setter* | set_albedo(value) |
  37. +-----------+-----------------------+
  38. | *Getter* | get_albedo() |
  39. +-----------+-----------------------+
  40. Sets 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>`.
  41. ----
  42. .. _class_FogMaterial_property_density:
  43. - :ref:`float<class_float>` **density**
  44. +-----------+--------------------+
  45. | *Default* | ``1.0`` |
  46. +-----------+--------------------+
  47. | *Setter* | set_density(value) |
  48. +-----------+--------------------+
  49. | *Getter* | get_density() |
  50. +-----------+--------------------+
  51. Sets the density of the :ref:`FogVolume<class_FogVolume>`. Denser objects are more opaque, but may suffer from under-sampling artifacts that look like stripes.
  52. ----
  53. .. _class_FogMaterial_property_density_texture:
  54. - :ref:`Texture3D<class_Texture3D>` **density_texture**
  55. +----------+----------------------------+
  56. | *Setter* | set_density_texture(value) |
  57. +----------+----------------------------+
  58. | *Getter* | get_density_texture() |
  59. +----------+----------------------------+
  60. Sets a 3D texture that is used to scale the :ref:`density<class_FogMaterial_property_density>` of the :ref:`FogVolume<class_FogVolume>`.
  61. ----
  62. .. _class_FogMaterial_property_edge_fade:
  63. - :ref:`float<class_float>` **edge_fade**
  64. +-----------+----------------------+
  65. | *Default* | ``0.1`` |
  66. +-----------+----------------------+
  67. | *Setter* | set_edge_fade(value) |
  68. +-----------+----------------------+
  69. | *Getter* | get_edge_fade() |
  70. +-----------+----------------------+
  71. Sets the hardness of the edges of the :ref:`FogVolume<class_FogVolume>`. A higher number will result in softer edges while a lower number will result in harder edges.
  72. ----
  73. .. _class_FogMaterial_property_emission:
  74. - :ref:`Color<class_Color>` **emission**
  75. +-----------+-----------------------+
  76. | *Default* | ``Color(0, 0, 0, 1)`` |
  77. +-----------+-----------------------+
  78. | *Setter* | set_emission(value) |
  79. +-----------+-----------------------+
  80. | *Getter* | get_emission() |
  81. +-----------+-----------------------+
  82. Sets 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. ----
  84. .. _class_FogMaterial_property_height_falloff:
  85. - :ref:`float<class_float>` **height_falloff**
  86. +-----------+---------------------------+
  87. | *Default* | ``0.0`` |
  88. +-----------+---------------------------+
  89. | *Setter* | set_height_falloff(value) |
  90. +-----------+---------------------------+
  91. | *Getter* | get_height_falloff() |
  92. +-----------+---------------------------+
  93. Sets 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`` results in uniform-density fog. The height threshold is determined by the height of the associated :ref:`FogVolume<class_FogVolume>`.
  94. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  95. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  96. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  97. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  98. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  99. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`