class_omnilight.rst 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the OmniLight.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_OmniLight:
  6. OmniLight
  7. =========
  8. **Inherits:** :ref:`Light<class_Light>` **<** :ref:`VisualInstance<class_VisualInstance>` **<** :ref:`Spatial<class_Spatial>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  9. Omnidirectional light, such as a light bulb or a candle.
  10. Description
  11. -----------
  12. An Omnidirectional light is a type of :ref:`Light<class_Light>` that emits light in all directions. The light is attenuated by distance and this attenuation can be configured by changing its energy, radius, and attenuation parameters.
  13. Tutorials
  14. ---------
  15. - :doc:`../tutorials/3d/lights_and_shadows`
  16. Properties
  17. ----------
  18. +--------------------------------------------------+------------------------------------------------------------------------+---------+
  19. | :ref:`float<class_float>` | :ref:`omni_attenuation<class_OmniLight_property_omni_attenuation>` | ``1.0`` |
  20. +--------------------------------------------------+------------------------------------------------------------------------+---------+
  21. | :ref:`float<class_float>` | :ref:`omni_range<class_OmniLight_property_omni_range>` | ``5.0`` |
  22. +--------------------------------------------------+------------------------------------------------------------------------+---------+
  23. | :ref:`ShadowDetail<enum_OmniLight_ShadowDetail>` | :ref:`omni_shadow_detail<class_OmniLight_property_omni_shadow_detail>` | ``1`` |
  24. +--------------------------------------------------+------------------------------------------------------------------------+---------+
  25. | :ref:`ShadowMode<enum_OmniLight_ShadowMode>` | :ref:`omni_shadow_mode<class_OmniLight_property_omni_shadow_mode>` | ``1`` |
  26. +--------------------------------------------------+------------------------------------------------------------------------+---------+
  27. Enumerations
  28. ------------
  29. .. _enum_OmniLight_ShadowMode:
  30. .. _class_OmniLight_constant_SHADOW_DUAL_PARABOLOID:
  31. .. _class_OmniLight_constant_SHADOW_CUBE:
  32. enum **ShadowMode**:
  33. - **SHADOW_DUAL_PARABOLOID** = **0** --- Shadows are rendered to a dual-paraboloid texture. Faster than :ref:`SHADOW_CUBE<class_OmniLight_constant_SHADOW_CUBE>`, but lower-quality.
  34. - **SHADOW_CUBE** = **1** --- Shadows are rendered to a cubemap. Slower than :ref:`SHADOW_DUAL_PARABOLOID<class_OmniLight_constant_SHADOW_DUAL_PARABOLOID>`, but higher-quality.
  35. ----
  36. .. _enum_OmniLight_ShadowDetail:
  37. .. _class_OmniLight_constant_SHADOW_DETAIL_VERTICAL:
  38. .. _class_OmniLight_constant_SHADOW_DETAIL_HORIZONTAL:
  39. enum **ShadowDetail**:
  40. - **SHADOW_DETAIL_VERTICAL** = **0** --- Use more detail vertically when computing the shadow.
  41. - **SHADOW_DETAIL_HORIZONTAL** = **1** --- Use more detail horizontally when computing the shadow.
  42. Property Descriptions
  43. ---------------------
  44. .. _class_OmniLight_property_omni_attenuation:
  45. - :ref:`float<class_float>` **omni_attenuation**
  46. +-----------+------------------+
  47. | *Default* | ``1.0`` |
  48. +-----------+------------------+
  49. | *Setter* | set_param(value) |
  50. +-----------+------------------+
  51. | *Getter* | get_param() |
  52. +-----------+------------------+
  53. The light's attenuation (drop-off) curve. A number of presets are available in the **Inspector** by right-clicking the curve.
  54. ----
  55. .. _class_OmniLight_property_omni_range:
  56. - :ref:`float<class_float>` **omni_range**
  57. +-----------+------------------+
  58. | *Default* | ``5.0`` |
  59. +-----------+------------------+
  60. | *Setter* | set_param(value) |
  61. +-----------+------------------+
  62. | *Getter* | get_param() |
  63. +-----------+------------------+
  64. The light's radius. Note that the effectively lit area may appear to be smaller depending on the :ref:`omni_attenuation<class_OmniLight_property_omni_attenuation>` in use. No matter the :ref:`omni_attenuation<class_OmniLight_property_omni_attenuation>` in use, the light will never reach anything outside this radius.
  65. ----
  66. .. _class_OmniLight_property_omni_shadow_detail:
  67. - :ref:`ShadowDetail<enum_OmniLight_ShadowDetail>` **omni_shadow_detail**
  68. +-----------+--------------------------+
  69. | *Default* | ``1`` |
  70. +-----------+--------------------------+
  71. | *Setter* | set_shadow_detail(value) |
  72. +-----------+--------------------------+
  73. | *Getter* | get_shadow_detail() |
  74. +-----------+--------------------------+
  75. See :ref:`ShadowDetail<enum_OmniLight_ShadowDetail>`.
  76. ----
  77. .. _class_OmniLight_property_omni_shadow_mode:
  78. - :ref:`ShadowMode<enum_OmniLight_ShadowMode>` **omni_shadow_mode**
  79. +-----------+------------------------+
  80. | *Default* | ``1`` |
  81. +-----------+------------------------+
  82. | *Setter* | set_shadow_mode(value) |
  83. +-----------+------------------------+
  84. | *Getter* | get_shadow_mode() |
  85. +-----------+------------------------+
  86. See :ref:`ShadowMode<enum_OmniLight_ShadowMode>`.
  87. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  88. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  89. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`