class_environment.rst 114 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205
  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/Environment.xml.
  6. .. _class_Environment:
  7. Environment
  8. ===========
  9. **Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  10. Resource for environment nodes (like :ref:`WorldEnvironment<class_WorldEnvironment>`) that define multiple rendering options.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. Resource for environment nodes (like :ref:`WorldEnvironment<class_WorldEnvironment>`) that define multiple environment operations (such as background :ref:`Sky<class_Sky>` or :ref:`Color<class_Color>`, ambient light, fog, depth-of-field...). These parameters affect the final render of the scene. The order of these operations is:
  15. - Depth of Field Blur
  16. - Glow
  17. - Tonemap (Auto Exposure)
  18. - Adjustments
  19. .. rst-class:: classref-introduction-group
  20. Tutorials
  21. ---------
  22. - :doc:`Environment and post-processing <../tutorials/3d/environment_and_post_processing>`
  23. - :doc:`Light transport in game engines <../tutorials/3d/high_dynamic_range>`
  24. - `3D Material Testers Demo <https://godotengine.org/asset-library/asset/123>`__
  25. - `2D HDR Demo <https://godotengine.org/asset-library/asset/110>`__
  26. - `Third Person Shooter Demo <https://godotengine.org/asset-library/asset/678>`__
  27. .. rst-class:: classref-reftable-group
  28. Properties
  29. ----------
  30. .. table::
  31. :widths: auto
  32. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  33. | :ref:`float<class_float>` | :ref:`adjustment_brightness<class_Environment_property_adjustment_brightness>` | ``1.0`` |
  34. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  35. | :ref:`Texture<class_Texture>` | :ref:`adjustment_color_correction<class_Environment_property_adjustment_color_correction>` | |
  36. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  37. | :ref:`float<class_float>` | :ref:`adjustment_contrast<class_Environment_property_adjustment_contrast>` | ``1.0`` |
  38. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  39. | :ref:`bool<class_bool>` | :ref:`adjustment_enabled<class_Environment_property_adjustment_enabled>` | ``false`` |
  40. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  41. | :ref:`float<class_float>` | :ref:`adjustment_saturation<class_Environment_property_adjustment_saturation>` | ``1.0`` |
  42. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  43. | :ref:`Color<class_Color>` | :ref:`ambient_light_color<class_Environment_property_ambient_light_color>` | ``Color(0, 0, 0, 1)`` |
  44. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  45. | :ref:`float<class_float>` | :ref:`ambient_light_energy<class_Environment_property_ambient_light_energy>` | ``1.0`` |
  46. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  47. | :ref:`float<class_float>` | :ref:`ambient_light_sky_contribution<class_Environment_property_ambient_light_sky_contribution>` | ``1.0`` |
  48. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  49. | :ref:`AmbientSource<enum_Environment_AmbientSource>` | :ref:`ambient_light_source<class_Environment_property_ambient_light_source>` | ``0`` |
  50. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  51. | :ref:`int<class_int>` | :ref:`background_camera_feed_id<class_Environment_property_background_camera_feed_id>` | ``1`` |
  52. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  53. | :ref:`int<class_int>` | :ref:`background_canvas_max_layer<class_Environment_property_background_canvas_max_layer>` | ``0`` |
  54. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  55. | :ref:`Color<class_Color>` | :ref:`background_color<class_Environment_property_background_color>` | ``Color(0, 0, 0, 1)`` |
  56. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  57. | :ref:`float<class_float>` | :ref:`background_energy_multiplier<class_Environment_property_background_energy_multiplier>` | ``1.0`` |
  58. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  59. | :ref:`float<class_float>` | :ref:`background_intensity<class_Environment_property_background_intensity>` | ``30000.0`` |
  60. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  61. | :ref:`BGMode<enum_Environment_BGMode>` | :ref:`background_mode<class_Environment_property_background_mode>` | ``0`` |
  62. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  63. | :ref:`float<class_float>` | :ref:`fog_aerial_perspective<class_Environment_property_fog_aerial_perspective>` | ``0.0`` |
  64. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  65. | :ref:`float<class_float>` | :ref:`fog_density<class_Environment_property_fog_density>` | ``0.01`` |
  66. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  67. | :ref:`bool<class_bool>` | :ref:`fog_enabled<class_Environment_property_fog_enabled>` | ``false`` |
  68. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  69. | :ref:`float<class_float>` | :ref:`fog_height<class_Environment_property_fog_height>` | ``0.0`` |
  70. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  71. | :ref:`float<class_float>` | :ref:`fog_height_density<class_Environment_property_fog_height_density>` | ``0.0`` |
  72. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  73. | :ref:`Color<class_Color>` | :ref:`fog_light_color<class_Environment_property_fog_light_color>` | ``Color(0.518, 0.553, 0.608, 1)`` |
  74. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  75. | :ref:`float<class_float>` | :ref:`fog_light_energy<class_Environment_property_fog_light_energy>` | ``1.0`` |
  76. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  77. | :ref:`float<class_float>` | :ref:`fog_sky_affect<class_Environment_property_fog_sky_affect>` | ``1.0`` |
  78. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  79. | :ref:`float<class_float>` | :ref:`fog_sun_scatter<class_Environment_property_fog_sun_scatter>` | ``0.0`` |
  80. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  81. | :ref:`GlowBlendMode<enum_Environment_GlowBlendMode>` | :ref:`glow_blend_mode<class_Environment_property_glow_blend_mode>` | ``2`` |
  82. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  83. | :ref:`float<class_float>` | :ref:`glow_bloom<class_Environment_property_glow_bloom>` | ``0.0`` |
  84. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  85. | :ref:`bool<class_bool>` | :ref:`glow_enabled<class_Environment_property_glow_enabled>` | ``false`` |
  86. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  87. | :ref:`float<class_float>` | :ref:`glow_hdr_luminance_cap<class_Environment_property_glow_hdr_luminance_cap>` | ``12.0`` |
  88. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  89. | :ref:`float<class_float>` | :ref:`glow_hdr_scale<class_Environment_property_glow_hdr_scale>` | ``2.0`` |
  90. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  91. | :ref:`float<class_float>` | :ref:`glow_hdr_threshold<class_Environment_property_glow_hdr_threshold>` | ``1.0`` |
  92. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  93. | :ref:`float<class_float>` | :ref:`glow_intensity<class_Environment_property_glow_intensity>` | ``0.8`` |
  94. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  95. | :ref:`float<class_float>` | :ref:`glow_levels/1<class_Environment_property_glow_levels/1>` | ``0.0`` |
  96. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  97. | :ref:`float<class_float>` | :ref:`glow_levels/2<class_Environment_property_glow_levels/2>` | ``0.0`` |
  98. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  99. | :ref:`float<class_float>` | :ref:`glow_levels/3<class_Environment_property_glow_levels/3>` | ``1.0`` |
  100. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  101. | :ref:`float<class_float>` | :ref:`glow_levels/4<class_Environment_property_glow_levels/4>` | ``0.0`` |
  102. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  103. | :ref:`float<class_float>` | :ref:`glow_levels/5<class_Environment_property_glow_levels/5>` | ``1.0`` |
  104. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  105. | :ref:`float<class_float>` | :ref:`glow_levels/6<class_Environment_property_glow_levels/6>` | ``0.0`` |
  106. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  107. | :ref:`float<class_float>` | :ref:`glow_levels/7<class_Environment_property_glow_levels/7>` | ``0.0`` |
  108. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  109. | :ref:`Texture<class_Texture>` | :ref:`glow_map<class_Environment_property_glow_map>` | |
  110. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  111. | :ref:`float<class_float>` | :ref:`glow_map_strength<class_Environment_property_glow_map_strength>` | ``0.8`` |
  112. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  113. | :ref:`float<class_float>` | :ref:`glow_mix<class_Environment_property_glow_mix>` | ``0.05`` |
  114. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  115. | :ref:`bool<class_bool>` | :ref:`glow_normalized<class_Environment_property_glow_normalized>` | ``false`` |
  116. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  117. | :ref:`float<class_float>` | :ref:`glow_strength<class_Environment_property_glow_strength>` | ``1.0`` |
  118. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  119. | :ref:`ReflectionSource<enum_Environment_ReflectionSource>` | :ref:`reflected_light_source<class_Environment_property_reflected_light_source>` | ``0`` |
  120. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  121. | :ref:`float<class_float>` | :ref:`sdfgi_bounce_feedback<class_Environment_property_sdfgi_bounce_feedback>` | ``0.5`` |
  122. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  123. | :ref:`float<class_float>` | :ref:`sdfgi_cascade0_distance<class_Environment_property_sdfgi_cascade0_distance>` | ``12.8`` |
  124. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  125. | :ref:`int<class_int>` | :ref:`sdfgi_cascades<class_Environment_property_sdfgi_cascades>` | ``4`` |
  126. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  127. | :ref:`bool<class_bool>` | :ref:`sdfgi_enabled<class_Environment_property_sdfgi_enabled>` | ``false`` |
  128. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  129. | :ref:`float<class_float>` | :ref:`sdfgi_energy<class_Environment_property_sdfgi_energy>` | ``1.0`` |
  130. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  131. | :ref:`float<class_float>` | :ref:`sdfgi_max_distance<class_Environment_property_sdfgi_max_distance>` | ``204.8`` |
  132. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  133. | :ref:`float<class_float>` | :ref:`sdfgi_min_cell_size<class_Environment_property_sdfgi_min_cell_size>` | ``0.2`` |
  134. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  135. | :ref:`float<class_float>` | :ref:`sdfgi_normal_bias<class_Environment_property_sdfgi_normal_bias>` | ``1.1`` |
  136. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  137. | :ref:`float<class_float>` | :ref:`sdfgi_probe_bias<class_Environment_property_sdfgi_probe_bias>` | ``1.1`` |
  138. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  139. | :ref:`bool<class_bool>` | :ref:`sdfgi_read_sky_light<class_Environment_property_sdfgi_read_sky_light>` | ``true`` |
  140. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  141. | :ref:`bool<class_bool>` | :ref:`sdfgi_use_occlusion<class_Environment_property_sdfgi_use_occlusion>` | ``false`` |
  142. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  143. | :ref:`SDFGIYScale<enum_Environment_SDFGIYScale>` | :ref:`sdfgi_y_scale<class_Environment_property_sdfgi_y_scale>` | ``1`` |
  144. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  145. | :ref:`Sky<class_Sky>` | :ref:`sky<class_Environment_property_sky>` | |
  146. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  147. | :ref:`float<class_float>` | :ref:`sky_custom_fov<class_Environment_property_sky_custom_fov>` | ``0.0`` |
  148. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  149. | :ref:`Vector3<class_Vector3>` | :ref:`sky_rotation<class_Environment_property_sky_rotation>` | ``Vector3(0, 0, 0)`` |
  150. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  151. | :ref:`float<class_float>` | :ref:`ssao_ao_channel_affect<class_Environment_property_ssao_ao_channel_affect>` | ``0.0`` |
  152. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  153. | :ref:`float<class_float>` | :ref:`ssao_detail<class_Environment_property_ssao_detail>` | ``0.5`` |
  154. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  155. | :ref:`bool<class_bool>` | :ref:`ssao_enabled<class_Environment_property_ssao_enabled>` | ``false`` |
  156. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  157. | :ref:`float<class_float>` | :ref:`ssao_horizon<class_Environment_property_ssao_horizon>` | ``0.06`` |
  158. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  159. | :ref:`float<class_float>` | :ref:`ssao_intensity<class_Environment_property_ssao_intensity>` | ``2.0`` |
  160. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  161. | :ref:`float<class_float>` | :ref:`ssao_light_affect<class_Environment_property_ssao_light_affect>` | ``0.0`` |
  162. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  163. | :ref:`float<class_float>` | :ref:`ssao_power<class_Environment_property_ssao_power>` | ``1.5`` |
  164. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  165. | :ref:`float<class_float>` | :ref:`ssao_radius<class_Environment_property_ssao_radius>` | ``1.0`` |
  166. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  167. | :ref:`float<class_float>` | :ref:`ssao_sharpness<class_Environment_property_ssao_sharpness>` | ``0.98`` |
  168. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  169. | :ref:`bool<class_bool>` | :ref:`ssil_enabled<class_Environment_property_ssil_enabled>` | ``false`` |
  170. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  171. | :ref:`float<class_float>` | :ref:`ssil_intensity<class_Environment_property_ssil_intensity>` | ``1.0`` |
  172. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  173. | :ref:`float<class_float>` | :ref:`ssil_normal_rejection<class_Environment_property_ssil_normal_rejection>` | ``1.0`` |
  174. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  175. | :ref:`float<class_float>` | :ref:`ssil_radius<class_Environment_property_ssil_radius>` | ``5.0`` |
  176. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  177. | :ref:`float<class_float>` | :ref:`ssil_sharpness<class_Environment_property_ssil_sharpness>` | ``0.98`` |
  178. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  179. | :ref:`float<class_float>` | :ref:`ssr_depth_tolerance<class_Environment_property_ssr_depth_tolerance>` | ``0.2`` |
  180. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  181. | :ref:`bool<class_bool>` | :ref:`ssr_enabled<class_Environment_property_ssr_enabled>` | ``false`` |
  182. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  183. | :ref:`float<class_float>` | :ref:`ssr_fade_in<class_Environment_property_ssr_fade_in>` | ``0.15`` |
  184. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  185. | :ref:`float<class_float>` | :ref:`ssr_fade_out<class_Environment_property_ssr_fade_out>` | ``2.0`` |
  186. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  187. | :ref:`int<class_int>` | :ref:`ssr_max_steps<class_Environment_property_ssr_max_steps>` | ``64`` |
  188. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  189. | :ref:`float<class_float>` | :ref:`tonemap_exposure<class_Environment_property_tonemap_exposure>` | ``1.0`` |
  190. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  191. | :ref:`ToneMapper<enum_Environment_ToneMapper>` | :ref:`tonemap_mode<class_Environment_property_tonemap_mode>` | ``0`` |
  192. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  193. | :ref:`float<class_float>` | :ref:`tonemap_white<class_Environment_property_tonemap_white>` | ``1.0`` |
  194. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  195. | :ref:`Color<class_Color>` | :ref:`volumetric_fog_albedo<class_Environment_property_volumetric_fog_albedo>` | ``Color(1, 1, 1, 1)`` |
  196. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  197. | :ref:`float<class_float>` | :ref:`volumetric_fog_ambient_inject<class_Environment_property_volumetric_fog_ambient_inject>` | ``0.0`` |
  198. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  199. | :ref:`float<class_float>` | :ref:`volumetric_fog_anisotropy<class_Environment_property_volumetric_fog_anisotropy>` | ``0.2`` |
  200. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  201. | :ref:`float<class_float>` | :ref:`volumetric_fog_density<class_Environment_property_volumetric_fog_density>` | ``0.05`` |
  202. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  203. | :ref:`float<class_float>` | :ref:`volumetric_fog_detail_spread<class_Environment_property_volumetric_fog_detail_spread>` | ``2.0`` |
  204. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  205. | :ref:`Color<class_Color>` | :ref:`volumetric_fog_emission<class_Environment_property_volumetric_fog_emission>` | ``Color(0, 0, 0, 1)`` |
  206. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  207. | :ref:`float<class_float>` | :ref:`volumetric_fog_emission_energy<class_Environment_property_volumetric_fog_emission_energy>` | ``1.0`` |
  208. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  209. | :ref:`bool<class_bool>` | :ref:`volumetric_fog_enabled<class_Environment_property_volumetric_fog_enabled>` | ``false`` |
  210. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  211. | :ref:`float<class_float>` | :ref:`volumetric_fog_gi_inject<class_Environment_property_volumetric_fog_gi_inject>` | ``1.0`` |
  212. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  213. | :ref:`float<class_float>` | :ref:`volumetric_fog_length<class_Environment_property_volumetric_fog_length>` | ``64.0`` |
  214. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  215. | :ref:`float<class_float>` | :ref:`volumetric_fog_sky_affect<class_Environment_property_volumetric_fog_sky_affect>` | ``1.0`` |
  216. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  217. | :ref:`float<class_float>` | :ref:`volumetric_fog_temporal_reprojection_amount<class_Environment_property_volumetric_fog_temporal_reprojection_amount>` | ``0.9`` |
  218. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  219. | :ref:`bool<class_bool>` | :ref:`volumetric_fog_temporal_reprojection_enabled<class_Environment_property_volumetric_fog_temporal_reprojection_enabled>` | ``true`` |
  220. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  221. .. rst-class:: classref-reftable-group
  222. Methods
  223. -------
  224. .. table::
  225. :widths: auto
  226. +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
  227. | :ref:`float<class_float>` | :ref:`get_glow_level<class_Environment_method_get_glow_level>` **(** :ref:`int<class_int>` idx **)** |const| |
  228. +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
  229. | void | :ref:`set_glow_level<class_Environment_method_set_glow_level>` **(** :ref:`int<class_int>` idx, :ref:`float<class_float>` intensity **)** |
  230. +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
  231. .. rst-class:: classref-section-separator
  232. ----
  233. .. rst-class:: classref-descriptions-group
  234. Enumerations
  235. ------------
  236. .. _enum_Environment_BGMode:
  237. .. rst-class:: classref-enumeration
  238. enum **BGMode**:
  239. .. _class_Environment_constant_BG_CLEAR_COLOR:
  240. .. rst-class:: classref-enumeration-constant
  241. :ref:`BGMode<enum_Environment_BGMode>` **BG_CLEAR_COLOR** = ``0``
  242. Clears the background using the clear color defined in :ref:`ProjectSettings.rendering/environment/defaults/default_clear_color<class_ProjectSettings_property_rendering/environment/defaults/default_clear_color>`.
  243. .. _class_Environment_constant_BG_COLOR:
  244. .. rst-class:: classref-enumeration-constant
  245. :ref:`BGMode<enum_Environment_BGMode>` **BG_COLOR** = ``1``
  246. Clears the background using a custom clear color.
  247. .. _class_Environment_constant_BG_SKY:
  248. .. rst-class:: classref-enumeration-constant
  249. :ref:`BGMode<enum_Environment_BGMode>` **BG_SKY** = ``2``
  250. Displays a user-defined sky in the background.
  251. .. _class_Environment_constant_BG_CANVAS:
  252. .. rst-class:: classref-enumeration-constant
  253. :ref:`BGMode<enum_Environment_BGMode>` **BG_CANVAS** = ``3``
  254. Displays a :ref:`CanvasLayer<class_CanvasLayer>` in the background.
  255. .. _class_Environment_constant_BG_KEEP:
  256. .. rst-class:: classref-enumeration-constant
  257. :ref:`BGMode<enum_Environment_BGMode>` **BG_KEEP** = ``4``
  258. Keeps on screen every pixel drawn in the background. This is the fastest background mode, but it can only be safely used in fully-interior scenes (no visible sky or sky reflections). If enabled in a scene where the background is visible, "ghost trail" artifacts will be visible when moving the camera.
  259. .. _class_Environment_constant_BG_CAMERA_FEED:
  260. .. rst-class:: classref-enumeration-constant
  261. :ref:`BGMode<enum_Environment_BGMode>` **BG_CAMERA_FEED** = ``5``
  262. Displays a camera feed in the background.
  263. .. _class_Environment_constant_BG_MAX:
  264. .. rst-class:: classref-enumeration-constant
  265. :ref:`BGMode<enum_Environment_BGMode>` **BG_MAX** = ``6``
  266. Represents the size of the :ref:`BGMode<enum_Environment_BGMode>` enum.
  267. .. rst-class:: classref-item-separator
  268. ----
  269. .. _enum_Environment_AmbientSource:
  270. .. rst-class:: classref-enumeration
  271. enum **AmbientSource**:
  272. .. _class_Environment_constant_AMBIENT_SOURCE_BG:
  273. .. rst-class:: classref-enumeration-constant
  274. :ref:`AmbientSource<enum_Environment_AmbientSource>` **AMBIENT_SOURCE_BG** = ``0``
  275. Gather ambient light from whichever source is specified as the background.
  276. .. _class_Environment_constant_AMBIENT_SOURCE_DISABLED:
  277. .. rst-class:: classref-enumeration-constant
  278. :ref:`AmbientSource<enum_Environment_AmbientSource>` **AMBIENT_SOURCE_DISABLED** = ``1``
  279. Disable ambient light. This provides a slight performance boost over :ref:`AMBIENT_SOURCE_SKY<class_Environment_constant_AMBIENT_SOURCE_SKY>`.
  280. .. _class_Environment_constant_AMBIENT_SOURCE_COLOR:
  281. .. rst-class:: classref-enumeration-constant
  282. :ref:`AmbientSource<enum_Environment_AmbientSource>` **AMBIENT_SOURCE_COLOR** = ``2``
  283. Specify a specific :ref:`Color<class_Color>` for ambient light. This provides a slight performance boost over :ref:`AMBIENT_SOURCE_SKY<class_Environment_constant_AMBIENT_SOURCE_SKY>`.
  284. .. _class_Environment_constant_AMBIENT_SOURCE_SKY:
  285. .. rst-class:: classref-enumeration-constant
  286. :ref:`AmbientSource<enum_Environment_AmbientSource>` **AMBIENT_SOURCE_SKY** = ``3``
  287. Gather ambient light from the :ref:`Sky<class_Sky>` regardless of what the background is.
  288. .. rst-class:: classref-item-separator
  289. ----
  290. .. _enum_Environment_ReflectionSource:
  291. .. rst-class:: classref-enumeration
  292. enum **ReflectionSource**:
  293. .. _class_Environment_constant_REFLECTION_SOURCE_BG:
  294. .. rst-class:: classref-enumeration-constant
  295. :ref:`ReflectionSource<enum_Environment_ReflectionSource>` **REFLECTION_SOURCE_BG** = ``0``
  296. Use the background for reflections.
  297. .. _class_Environment_constant_REFLECTION_SOURCE_DISABLED:
  298. .. rst-class:: classref-enumeration-constant
  299. :ref:`ReflectionSource<enum_Environment_ReflectionSource>` **REFLECTION_SOURCE_DISABLED** = ``1``
  300. Disable reflections. This provides a slight performance boost over other options.
  301. .. _class_Environment_constant_REFLECTION_SOURCE_SKY:
  302. .. rst-class:: classref-enumeration-constant
  303. :ref:`ReflectionSource<enum_Environment_ReflectionSource>` **REFLECTION_SOURCE_SKY** = ``2``
  304. Use the :ref:`Sky<class_Sky>` for reflections regardless of what the background is.
  305. .. rst-class:: classref-item-separator
  306. ----
  307. .. _enum_Environment_ToneMapper:
  308. .. rst-class:: classref-enumeration
  309. enum **ToneMapper**:
  310. .. _class_Environment_constant_TONE_MAPPER_LINEAR:
  311. .. rst-class:: classref-enumeration-constant
  312. :ref:`ToneMapper<enum_Environment_ToneMapper>` **TONE_MAPPER_LINEAR** = ``0``
  313. Linear tonemapper operator. Reads the linear data and passes it on unmodified. This can cause bright lighting to look blown out, with noticeable clipping in the output colors.
  314. .. _class_Environment_constant_TONE_MAPPER_REINHARDT:
  315. .. rst-class:: classref-enumeration-constant
  316. :ref:`ToneMapper<enum_Environment_ToneMapper>` **TONE_MAPPER_REINHARDT** = ``1``
  317. Reinhardt tonemapper operator. Performs a variation on rendered pixels' colors by this formula: ``color = color / (1 + color)``. This avoids clipping bright highlights, but the resulting image can look a bit dull.
  318. .. _class_Environment_constant_TONE_MAPPER_FILMIC:
  319. .. rst-class:: classref-enumeration-constant
  320. :ref:`ToneMapper<enum_Environment_ToneMapper>` **TONE_MAPPER_FILMIC** = ``2``
  321. Filmic tonemapper operator. This avoids clipping bright highlights, with a resulting image that usually looks more vivid than :ref:`TONE_MAPPER_REINHARDT<class_Environment_constant_TONE_MAPPER_REINHARDT>`.
  322. .. _class_Environment_constant_TONE_MAPPER_ACES:
  323. .. rst-class:: classref-enumeration-constant
  324. :ref:`ToneMapper<enum_Environment_ToneMapper>` **TONE_MAPPER_ACES** = ``3``
  325. Use the Academy Color Encoding System tonemapper. ACES is slightly more expensive than other options, but it handles bright lighting in a more realistic fashion by desaturating it as it becomes brighter. ACES typically has a more contrasted output compared to :ref:`TONE_MAPPER_REINHARDT<class_Environment_constant_TONE_MAPPER_REINHARDT>` and :ref:`TONE_MAPPER_FILMIC<class_Environment_constant_TONE_MAPPER_FILMIC>`.
  326. \ **Note:** This tonemapping operator is called "ACES Fitted" in Godot 3.x.
  327. .. rst-class:: classref-item-separator
  328. ----
  329. .. _enum_Environment_GlowBlendMode:
  330. .. rst-class:: classref-enumeration
  331. enum **GlowBlendMode**:
  332. .. _class_Environment_constant_GLOW_BLEND_MODE_ADDITIVE:
  333. .. rst-class:: classref-enumeration-constant
  334. :ref:`GlowBlendMode<enum_Environment_GlowBlendMode>` **GLOW_BLEND_MODE_ADDITIVE** = ``0``
  335. Additive glow blending mode. Mostly used for particles, glows (bloom), lens flare, bright sources.
  336. .. _class_Environment_constant_GLOW_BLEND_MODE_SCREEN:
  337. .. rst-class:: classref-enumeration-constant
  338. :ref:`GlowBlendMode<enum_Environment_GlowBlendMode>` **GLOW_BLEND_MODE_SCREEN** = ``1``
  339. Screen glow blending mode. Increases brightness, used frequently with bloom.
  340. .. _class_Environment_constant_GLOW_BLEND_MODE_SOFTLIGHT:
  341. .. rst-class:: classref-enumeration-constant
  342. :ref:`GlowBlendMode<enum_Environment_GlowBlendMode>` **GLOW_BLEND_MODE_SOFTLIGHT** = ``2``
  343. Soft light glow blending mode. Modifies contrast, exposes shadows and highlights (vivid bloom).
  344. .. _class_Environment_constant_GLOW_BLEND_MODE_REPLACE:
  345. .. rst-class:: classref-enumeration-constant
  346. :ref:`GlowBlendMode<enum_Environment_GlowBlendMode>` **GLOW_BLEND_MODE_REPLACE** = ``3``
  347. Replace glow blending mode. Replaces all pixels' color by the glow value. This can be used to simulate a full-screen blur effect by tweaking the glow parameters to match the original image's brightness.
  348. .. _class_Environment_constant_GLOW_BLEND_MODE_MIX:
  349. .. rst-class:: classref-enumeration-constant
  350. :ref:`GlowBlendMode<enum_Environment_GlowBlendMode>` **GLOW_BLEND_MODE_MIX** = ``4``
  351. Mixes the glow with the underlying color to avoid increasing brightness as much while still maintaining a glow effect.
  352. .. rst-class:: classref-item-separator
  353. ----
  354. .. _enum_Environment_SDFGIYScale:
  355. .. rst-class:: classref-enumeration
  356. enum **SDFGIYScale**:
  357. .. _class_Environment_constant_SDFGI_Y_SCALE_50_PERCENT:
  358. .. rst-class:: classref-enumeration-constant
  359. :ref:`SDFGIYScale<enum_Environment_SDFGIYScale>` **SDFGI_Y_SCALE_50_PERCENT** = ``0``
  360. Use 50% scale for SDFGI on the Y (vertical) axis. SDFGI cells will be twice as short as they are wide. This allows providing increased GI detail and reduced light leaking with thin floors and ceilings. This is usually the best choice for scenes that don't feature much verticality.
  361. .. _class_Environment_constant_SDFGI_Y_SCALE_75_PERCENT:
  362. .. rst-class:: classref-enumeration-constant
  363. :ref:`SDFGIYScale<enum_Environment_SDFGIYScale>` **SDFGI_Y_SCALE_75_PERCENT** = ``1``
  364. Use 75% scale for SDFGI on the Y (vertical) axis. This is a balance between the 50% and 100% SDFGI Y scales.
  365. .. _class_Environment_constant_SDFGI_Y_SCALE_100_PERCENT:
  366. .. rst-class:: classref-enumeration-constant
  367. :ref:`SDFGIYScale<enum_Environment_SDFGIYScale>` **SDFGI_Y_SCALE_100_PERCENT** = ``2``
  368. Use 100% scale for SDFGI on the Y (vertical) axis. SDFGI cells will be as tall as they are wide. This is usually the best choice for highly vertical scenes. The downside is that light leaking may become more noticeable with thin floors and ceilings.
  369. .. rst-class:: classref-section-separator
  370. ----
  371. .. rst-class:: classref-descriptions-group
  372. Property Descriptions
  373. ---------------------
  374. .. _class_Environment_property_adjustment_brightness:
  375. .. rst-class:: classref-property
  376. :ref:`float<class_float>` **adjustment_brightness** = ``1.0``
  377. .. rst-class:: classref-property-setget
  378. - void **set_adjustment_brightness** **(** :ref:`float<class_float>` value **)**
  379. - :ref:`float<class_float>` **get_adjustment_brightness** **(** **)**
  380. The global brightness value of the rendered scene. Effective only if ``adjustment_enabled`` is ``true``.
  381. .. rst-class:: classref-item-separator
  382. ----
  383. .. _class_Environment_property_adjustment_color_correction:
  384. .. rst-class:: classref-property
  385. :ref:`Texture<class_Texture>` **adjustment_color_correction**
  386. .. rst-class:: classref-property-setget
  387. - void **set_adjustment_color_correction** **(** :ref:`Texture<class_Texture>` value **)**
  388. - :ref:`Texture<class_Texture>` **get_adjustment_color_correction** **(** **)**
  389. The :ref:`Texture2D<class_Texture2D>` or :ref:`Texture3D<class_Texture3D>` lookup table (LUT) to use for the built-in post-process color grading. Can use a :ref:`GradientTexture1D<class_GradientTexture1D>` for a 1-dimensional LUT, or a :ref:`Texture3D<class_Texture3D>` for a more complex LUT. Effective only if ``adjustment_enabled`` is ``true``.
  390. .. rst-class:: classref-item-separator
  391. ----
  392. .. _class_Environment_property_adjustment_contrast:
  393. .. rst-class:: classref-property
  394. :ref:`float<class_float>` **adjustment_contrast** = ``1.0``
  395. .. rst-class:: classref-property-setget
  396. - void **set_adjustment_contrast** **(** :ref:`float<class_float>` value **)**
  397. - :ref:`float<class_float>` **get_adjustment_contrast** **(** **)**
  398. The global contrast value of the rendered scene (default value is 1). Effective only if ``adjustment_enabled`` is ``true``.
  399. .. rst-class:: classref-item-separator
  400. ----
  401. .. _class_Environment_property_adjustment_enabled:
  402. .. rst-class:: classref-property
  403. :ref:`bool<class_bool>` **adjustment_enabled** = ``false``
  404. .. rst-class:: classref-property-setget
  405. - void **set_adjustment_enabled** **(** :ref:`bool<class_bool>` value **)**
  406. - :ref:`bool<class_bool>` **is_adjustment_enabled** **(** **)**
  407. If ``true``, enables the ``adjustment_*`` properties provided by this resource. If ``false``, modifications to the ``adjustment_*`` properties will have no effect on the rendered scene.
  408. .. rst-class:: classref-item-separator
  409. ----
  410. .. _class_Environment_property_adjustment_saturation:
  411. .. rst-class:: classref-property
  412. :ref:`float<class_float>` **adjustment_saturation** = ``1.0``
  413. .. rst-class:: classref-property-setget
  414. - void **set_adjustment_saturation** **(** :ref:`float<class_float>` value **)**
  415. - :ref:`float<class_float>` **get_adjustment_saturation** **(** **)**
  416. The global color saturation value of the rendered scene (default value is 1). Effective only if ``adjustment_enabled`` is ``true``.
  417. .. rst-class:: classref-item-separator
  418. ----
  419. .. _class_Environment_property_ambient_light_color:
  420. .. rst-class:: classref-property
  421. :ref:`Color<class_Color>` **ambient_light_color** = ``Color(0, 0, 0, 1)``
  422. .. rst-class:: classref-property-setget
  423. - void **set_ambient_light_color** **(** :ref:`Color<class_Color>` value **)**
  424. - :ref:`Color<class_Color>` **get_ambient_light_color** **(** **)**
  425. The ambient light's :ref:`Color<class_Color>`. Only effective if :ref:`ambient_light_sky_contribution<class_Environment_property_ambient_light_sky_contribution>` is lower than ``1.0`` (exclusive).
  426. .. rst-class:: classref-item-separator
  427. ----
  428. .. _class_Environment_property_ambient_light_energy:
  429. .. rst-class:: classref-property
  430. :ref:`float<class_float>` **ambient_light_energy** = ``1.0``
  431. .. rst-class:: classref-property-setget
  432. - void **set_ambient_light_energy** **(** :ref:`float<class_float>` value **)**
  433. - :ref:`float<class_float>` **get_ambient_light_energy** **(** **)**
  434. The ambient light's energy. The higher the value, the stronger the light. Only effective if :ref:`ambient_light_sky_contribution<class_Environment_property_ambient_light_sky_contribution>` is lower than ``1.0`` (exclusive).
  435. .. rst-class:: classref-item-separator
  436. ----
  437. .. _class_Environment_property_ambient_light_sky_contribution:
  438. .. rst-class:: classref-property
  439. :ref:`float<class_float>` **ambient_light_sky_contribution** = ``1.0``
  440. .. rst-class:: classref-property-setget
  441. - void **set_ambient_light_sky_contribution** **(** :ref:`float<class_float>` value **)**
  442. - :ref:`float<class_float>` **get_ambient_light_sky_contribution** **(** **)**
  443. Defines the amount of light that the sky brings on the scene. A value of ``0.0`` means that the sky's light emission has no effect on the scene illumination, thus all ambient illumination is provided by the ambient light. On the contrary, a value of ``1.0`` means that *all* the light that affects the scene is provided by the sky, thus the ambient light parameter has no effect on the scene.
  444. \ **Note:** :ref:`ambient_light_sky_contribution<class_Environment_property_ambient_light_sky_contribution>` is internally clamped between ``0.0`` and ``1.0`` (inclusive).
  445. .. rst-class:: classref-item-separator
  446. ----
  447. .. _class_Environment_property_ambient_light_source:
  448. .. rst-class:: classref-property
  449. :ref:`AmbientSource<enum_Environment_AmbientSource>` **ambient_light_source** = ``0``
  450. .. rst-class:: classref-property-setget
  451. - void **set_ambient_source** **(** :ref:`AmbientSource<enum_Environment_AmbientSource>` value **)**
  452. - :ref:`AmbientSource<enum_Environment_AmbientSource>` **get_ambient_source** **(** **)**
  453. The ambient light source to use for rendering materials and global illumination.
  454. .. rst-class:: classref-item-separator
  455. ----
  456. .. _class_Environment_property_background_camera_feed_id:
  457. .. rst-class:: classref-property
  458. :ref:`int<class_int>` **background_camera_feed_id** = ``1``
  459. .. rst-class:: classref-property-setget
  460. - void **set_camera_feed_id** **(** :ref:`int<class_int>` value **)**
  461. - :ref:`int<class_int>` **get_camera_feed_id** **(** **)**
  462. The ID of the camera feed to show in the background.
  463. .. rst-class:: classref-item-separator
  464. ----
  465. .. _class_Environment_property_background_canvas_max_layer:
  466. .. rst-class:: classref-property
  467. :ref:`int<class_int>` **background_canvas_max_layer** = ``0``
  468. .. rst-class:: classref-property-setget
  469. - void **set_canvas_max_layer** **(** :ref:`int<class_int>` value **)**
  470. - :ref:`int<class_int>` **get_canvas_max_layer** **(** **)**
  471. The maximum layer ID to display. Only effective when using the :ref:`BG_CANVAS<class_Environment_constant_BG_CANVAS>` background mode.
  472. .. rst-class:: classref-item-separator
  473. ----
  474. .. _class_Environment_property_background_color:
  475. .. rst-class:: classref-property
  476. :ref:`Color<class_Color>` **background_color** = ``Color(0, 0, 0, 1)``
  477. .. rst-class:: classref-property-setget
  478. - void **set_bg_color** **(** :ref:`Color<class_Color>` value **)**
  479. - :ref:`Color<class_Color>` **get_bg_color** **(** **)**
  480. The :ref:`Color<class_Color>` displayed for clear areas of the scene. Only effective when using the :ref:`BG_COLOR<class_Environment_constant_BG_COLOR>` background mode.
  481. .. rst-class:: classref-item-separator
  482. ----
  483. .. _class_Environment_property_background_energy_multiplier:
  484. .. rst-class:: classref-property
  485. :ref:`float<class_float>` **background_energy_multiplier** = ``1.0``
  486. .. rst-class:: classref-property-setget
  487. - void **set_bg_energy_multiplier** **(** :ref:`float<class_float>` value **)**
  488. - :ref:`float<class_float>` **get_bg_energy_multiplier** **(** **)**
  489. Multiplier for background energy. Increase to make background brighter, decrease to make background dimmer.
  490. .. rst-class:: classref-item-separator
  491. ----
  492. .. _class_Environment_property_background_intensity:
  493. .. rst-class:: classref-property
  494. :ref:`float<class_float>` **background_intensity** = ``30000.0``
  495. .. rst-class:: classref-property-setget
  496. - void **set_bg_intensity** **(** :ref:`float<class_float>` value **)**
  497. - :ref:`float<class_float>` **get_bg_intensity** **(** **)**
  498. Luminance of background measured in nits (candela per square meter). Only used when :ref:`ProjectSettings.rendering/lights_and_shadows/use_physical_light_units<class_ProjectSettings_property_rendering/lights_and_shadows/use_physical_light_units>` is enabled. The default value is roughly equivalent to the sky at midday.
  499. .. rst-class:: classref-item-separator
  500. ----
  501. .. _class_Environment_property_background_mode:
  502. .. rst-class:: classref-property
  503. :ref:`BGMode<enum_Environment_BGMode>` **background_mode** = ``0``
  504. .. rst-class:: classref-property-setget
  505. - void **set_background** **(** :ref:`BGMode<enum_Environment_BGMode>` value **)**
  506. - :ref:`BGMode<enum_Environment_BGMode>` **get_background** **(** **)**
  507. The background mode. See :ref:`BGMode<enum_Environment_BGMode>` for possible values.
  508. .. rst-class:: classref-item-separator
  509. ----
  510. .. _class_Environment_property_fog_aerial_perspective:
  511. .. rst-class:: classref-property
  512. :ref:`float<class_float>` **fog_aerial_perspective** = ``0.0``
  513. .. rst-class:: classref-property-setget
  514. - void **set_fog_aerial_perspective** **(** :ref:`float<class_float>` value **)**
  515. - :ref:`float<class_float>` **get_fog_aerial_perspective** **(** **)**
  516. If set above ``0.0`` (exclusive), blends between the fog's color and the color of the background :ref:`Sky<class_Sky>`. This has a small performance cost when set above ``0.0``. Must have :ref:`background_mode<class_Environment_property_background_mode>` set to :ref:`BG_SKY<class_Environment_constant_BG_SKY>`.
  517. This is useful to simulate `aerial perspective <https://en.wikipedia.org/wiki/Aerial_perspective>`__ in large scenes with low density fog. However, it is not very useful for high-density fog, as the sky will shine through. When set to ``1.0``, the fog color comes completely from the :ref:`Sky<class_Sky>`. If set to ``0.0``, aerial perspective is disabled.
  518. .. rst-class:: classref-item-separator
  519. ----
  520. .. _class_Environment_property_fog_density:
  521. .. rst-class:: classref-property
  522. :ref:`float<class_float>` **fog_density** = ``0.01``
  523. .. rst-class:: classref-property-setget
  524. - void **set_fog_density** **(** :ref:`float<class_float>` value **)**
  525. - :ref:`float<class_float>` **get_fog_density** **(** **)**
  526. The *exponential* fog density to use. Higher values result in a more dense fog. Fog rendering is exponential as in real life.
  527. .. rst-class:: classref-item-separator
  528. ----
  529. .. _class_Environment_property_fog_enabled:
  530. .. rst-class:: classref-property
  531. :ref:`bool<class_bool>` **fog_enabled** = ``false``
  532. .. rst-class:: classref-property-setget
  533. - void **set_fog_enabled** **(** :ref:`bool<class_bool>` value **)**
  534. - :ref:`bool<class_bool>` **is_fog_enabled** **(** **)**
  535. If ``true``, fog effects are enabled.
  536. .. rst-class:: classref-item-separator
  537. ----
  538. .. _class_Environment_property_fog_height:
  539. .. rst-class:: classref-property
  540. :ref:`float<class_float>` **fog_height** = ``0.0``
  541. .. rst-class:: classref-property-setget
  542. - void **set_fog_height** **(** :ref:`float<class_float>` value **)**
  543. - :ref:`float<class_float>` **get_fog_height** **(** **)**
  544. The height at which the height fog effect begins.
  545. .. rst-class:: classref-item-separator
  546. ----
  547. .. _class_Environment_property_fog_height_density:
  548. .. rst-class:: classref-property
  549. :ref:`float<class_float>` **fog_height_density** = ``0.0``
  550. .. rst-class:: classref-property-setget
  551. - void **set_fog_height_density** **(** :ref:`float<class_float>` value **)**
  552. - :ref:`float<class_float>` **get_fog_height_density** **(** **)**
  553. The density used to increase fog as height decreases. To make fog increase as height increases, use a negative value.
  554. .. rst-class:: classref-item-separator
  555. ----
  556. .. _class_Environment_property_fog_light_color:
  557. .. rst-class:: classref-property
  558. :ref:`Color<class_Color>` **fog_light_color** = ``Color(0.518, 0.553, 0.608, 1)``
  559. .. rst-class:: classref-property-setget
  560. - void **set_fog_light_color** **(** :ref:`Color<class_Color>` value **)**
  561. - :ref:`Color<class_Color>` **get_fog_light_color** **(** **)**
  562. The fog's color.
  563. .. rst-class:: classref-item-separator
  564. ----
  565. .. _class_Environment_property_fog_light_energy:
  566. .. rst-class:: classref-property
  567. :ref:`float<class_float>` **fog_light_energy** = ``1.0``
  568. .. rst-class:: classref-property-setget
  569. - void **set_fog_light_energy** **(** :ref:`float<class_float>` value **)**
  570. - :ref:`float<class_float>` **get_fog_light_energy** **(** **)**
  571. The fog's brightness. Higher values result in brighter fog.
  572. .. rst-class:: classref-item-separator
  573. ----
  574. .. _class_Environment_property_fog_sky_affect:
  575. .. rst-class:: classref-property
  576. :ref:`float<class_float>` **fog_sky_affect** = ``1.0``
  577. .. rst-class:: classref-property-setget
  578. - void **set_fog_sky_affect** **(** :ref:`float<class_float>` value **)**
  579. - :ref:`float<class_float>` **get_fog_sky_affect** **(** **)**
  580. The factor to use when affecting the sky with non-volumetric fog. ``1.0`` means that fog can fully obscure the sky. Lower values reduce the impact of fog on sky rendering, with ``0.0`` not affecting sky rendering at all.
  581. \ **Note:** :ref:`fog_sky_affect<class_Environment_property_fog_sky_affect>` has no visual effect if :ref:`fog_aerial_perspective<class_Environment_property_fog_aerial_perspective>` is ``1.0``.
  582. .. rst-class:: classref-item-separator
  583. ----
  584. .. _class_Environment_property_fog_sun_scatter:
  585. .. rst-class:: classref-property
  586. :ref:`float<class_float>` **fog_sun_scatter** = ``0.0``
  587. .. rst-class:: classref-property-setget
  588. - void **set_fog_sun_scatter** **(** :ref:`float<class_float>` value **)**
  589. - :ref:`float<class_float>` **get_fog_sun_scatter** **(** **)**
  590. If set above ``0.0``, renders the scene's directional light(s) in the fog color depending on the view angle. This can be used to give the impression that the sun is "piercing" through the fog.
  591. .. rst-class:: classref-item-separator
  592. ----
  593. .. _class_Environment_property_glow_blend_mode:
  594. .. rst-class:: classref-property
  595. :ref:`GlowBlendMode<enum_Environment_GlowBlendMode>` **glow_blend_mode** = ``2``
  596. .. rst-class:: classref-property-setget
  597. - void **set_glow_blend_mode** **(** :ref:`GlowBlendMode<enum_Environment_GlowBlendMode>` value **)**
  598. - :ref:`GlowBlendMode<enum_Environment_GlowBlendMode>` **get_glow_blend_mode** **(** **)**
  599. The glow blending mode.
  600. .. rst-class:: classref-item-separator
  601. ----
  602. .. _class_Environment_property_glow_bloom:
  603. .. rst-class:: classref-property
  604. :ref:`float<class_float>` **glow_bloom** = ``0.0``
  605. .. rst-class:: classref-property-setget
  606. - void **set_glow_bloom** **(** :ref:`float<class_float>` value **)**
  607. - :ref:`float<class_float>` **get_glow_bloom** **(** **)**
  608. The bloom's intensity. If set to a value higher than ``0``, this will make glow visible in areas darker than the :ref:`glow_hdr_threshold<class_Environment_property_glow_hdr_threshold>`.
  609. .. rst-class:: classref-item-separator
  610. ----
  611. .. _class_Environment_property_glow_enabled:
  612. .. rst-class:: classref-property
  613. :ref:`bool<class_bool>` **glow_enabled** = ``false``
  614. .. rst-class:: classref-property-setget
  615. - void **set_glow_enabled** **(** :ref:`bool<class_bool>` value **)**
  616. - :ref:`bool<class_bool>` **is_glow_enabled** **(** **)**
  617. If ``true``, the glow effect is enabled.
  618. .. rst-class:: classref-item-separator
  619. ----
  620. .. _class_Environment_property_glow_hdr_luminance_cap:
  621. .. rst-class:: classref-property
  622. :ref:`float<class_float>` **glow_hdr_luminance_cap** = ``12.0``
  623. .. rst-class:: classref-property-setget
  624. - void **set_glow_hdr_luminance_cap** **(** :ref:`float<class_float>` value **)**
  625. - :ref:`float<class_float>` **get_glow_hdr_luminance_cap** **(** **)**
  626. The higher threshold of the HDR glow. Areas brighter than this threshold will be clamped for the purposes of the glow effect.
  627. .. rst-class:: classref-item-separator
  628. ----
  629. .. _class_Environment_property_glow_hdr_scale:
  630. .. rst-class:: classref-property
  631. :ref:`float<class_float>` **glow_hdr_scale** = ``2.0``
  632. .. rst-class:: classref-property-setget
  633. - void **set_glow_hdr_bleed_scale** **(** :ref:`float<class_float>` value **)**
  634. - :ref:`float<class_float>` **get_glow_hdr_bleed_scale** **(** **)**
  635. The bleed scale of the HDR glow.
  636. .. rst-class:: classref-item-separator
  637. ----
  638. .. _class_Environment_property_glow_hdr_threshold:
  639. .. rst-class:: classref-property
  640. :ref:`float<class_float>` **glow_hdr_threshold** = ``1.0``
  641. .. rst-class:: classref-property-setget
  642. - void **set_glow_hdr_bleed_threshold** **(** :ref:`float<class_float>` value **)**
  643. - :ref:`float<class_float>` **get_glow_hdr_bleed_threshold** **(** **)**
  644. The lower threshold of the HDR glow. When using the OpenGL renderer (which doesn't support HDR), this needs to be below ``1.0`` for glow to be visible. A value of ``0.9`` works well in this case.
  645. .. rst-class:: classref-item-separator
  646. ----
  647. .. _class_Environment_property_glow_intensity:
  648. .. rst-class:: classref-property
  649. :ref:`float<class_float>` **glow_intensity** = ``0.8``
  650. .. rst-class:: classref-property-setget
  651. - void **set_glow_intensity** **(** :ref:`float<class_float>` value **)**
  652. - :ref:`float<class_float>` **get_glow_intensity** **(** **)**
  653. The overall brightness multiplier of the glow effect. When using the OpenGL renderer, this should be increased to ``1.5`` to compensate for the lack of HDR rendering.
  654. .. rst-class:: classref-item-separator
  655. ----
  656. .. _class_Environment_property_glow_levels/1:
  657. .. rst-class:: classref-property
  658. :ref:`float<class_float>` **glow_levels/1** = ``0.0``
  659. .. rst-class:: classref-property-setget
  660. - void **set_glow_level** **(** :ref:`int<class_int>` idx, :ref:`float<class_float>` intensity **)**
  661. - :ref:`float<class_float>` **get_glow_level** **(** :ref:`int<class_int>` idx **)** |const|
  662. The intensity of the 1st level of glow. This is the most "local" level (least blurry).
  663. .. rst-class:: classref-item-separator
  664. ----
  665. .. _class_Environment_property_glow_levels/2:
  666. .. rst-class:: classref-property
  667. :ref:`float<class_float>` **glow_levels/2** = ``0.0``
  668. .. rst-class:: classref-property-setget
  669. - void **set_glow_level** **(** :ref:`int<class_int>` idx, :ref:`float<class_float>` intensity **)**
  670. - :ref:`float<class_float>` **get_glow_level** **(** :ref:`int<class_int>` idx **)** |const|
  671. The intensity of the 2nd level of glow.
  672. .. rst-class:: classref-item-separator
  673. ----
  674. .. _class_Environment_property_glow_levels/3:
  675. .. rst-class:: classref-property
  676. :ref:`float<class_float>` **glow_levels/3** = ``1.0``
  677. .. rst-class:: classref-property-setget
  678. - void **set_glow_level** **(** :ref:`int<class_int>` idx, :ref:`float<class_float>` intensity **)**
  679. - :ref:`float<class_float>` **get_glow_level** **(** :ref:`int<class_int>` idx **)** |const|
  680. The intensity of the 3rd level of glow.
  681. .. rst-class:: classref-item-separator
  682. ----
  683. .. _class_Environment_property_glow_levels/4:
  684. .. rst-class:: classref-property
  685. :ref:`float<class_float>` **glow_levels/4** = ``0.0``
  686. .. rst-class:: classref-property-setget
  687. - void **set_glow_level** **(** :ref:`int<class_int>` idx, :ref:`float<class_float>` intensity **)**
  688. - :ref:`float<class_float>` **get_glow_level** **(** :ref:`int<class_int>` idx **)** |const|
  689. The intensity of the 4th level of glow.
  690. .. rst-class:: classref-item-separator
  691. ----
  692. .. _class_Environment_property_glow_levels/5:
  693. .. rst-class:: classref-property
  694. :ref:`float<class_float>` **glow_levels/5** = ``1.0``
  695. .. rst-class:: classref-property-setget
  696. - void **set_glow_level** **(** :ref:`int<class_int>` idx, :ref:`float<class_float>` intensity **)**
  697. - :ref:`float<class_float>` **get_glow_level** **(** :ref:`int<class_int>` idx **)** |const|
  698. The intensity of the 5th level of glow.
  699. .. rst-class:: classref-item-separator
  700. ----
  701. .. _class_Environment_property_glow_levels/6:
  702. .. rst-class:: classref-property
  703. :ref:`float<class_float>` **glow_levels/6** = ``0.0``
  704. .. rst-class:: classref-property-setget
  705. - void **set_glow_level** **(** :ref:`int<class_int>` idx, :ref:`float<class_float>` intensity **)**
  706. - :ref:`float<class_float>` **get_glow_level** **(** :ref:`int<class_int>` idx **)** |const|
  707. The intensity of the 6th level of glow.
  708. .. rst-class:: classref-item-separator
  709. ----
  710. .. _class_Environment_property_glow_levels/7:
  711. .. rst-class:: classref-property
  712. :ref:`float<class_float>` **glow_levels/7** = ``0.0``
  713. .. rst-class:: classref-property-setget
  714. - void **set_glow_level** **(** :ref:`int<class_int>` idx, :ref:`float<class_float>` intensity **)**
  715. - :ref:`float<class_float>` **get_glow_level** **(** :ref:`int<class_int>` idx **)** |const|
  716. The intensity of the 7th level of glow. This is the most "global" level (blurriest).
  717. .. rst-class:: classref-item-separator
  718. ----
  719. .. _class_Environment_property_glow_map:
  720. .. rst-class:: classref-property
  721. :ref:`Texture<class_Texture>` **glow_map**
  722. .. rst-class:: classref-property-setget
  723. - void **set_glow_map** **(** :ref:`Texture<class_Texture>` value **)**
  724. - :ref:`Texture<class_Texture>` **get_glow_map** **(** **)**
  725. The texture that should be used as a glow map to *multiply* the resulting glow color according to :ref:`glow_map_strength<class_Environment_property_glow_map_strength>`. This can be used to create a "lens dirt" effect. The texture's RGB color channels are used for modulation, but the alpha channel is ignored.
  726. \ **Note:** The texture will be stretched to fit the screen. Therefore, it's recommended to use a texture with an aspect ratio that matches your project's base aspect ratio (typically 16:9).
  727. .. rst-class:: classref-item-separator
  728. ----
  729. .. _class_Environment_property_glow_map_strength:
  730. .. rst-class:: classref-property
  731. :ref:`float<class_float>` **glow_map_strength** = ``0.8``
  732. .. rst-class:: classref-property-setget
  733. - void **set_glow_map_strength** **(** :ref:`float<class_float>` value **)**
  734. - :ref:`float<class_float>` **get_glow_map_strength** **(** **)**
  735. How strong of an impact the :ref:`glow_map<class_Environment_property_glow_map>` should have on the overall glow effect. A strength of ``0.0`` means the glow map has no effect on the overall glow effect. A strength of ``1.0`` means the glow has a full effect on the overall glow effect (and can turn off glow entirely in specific areas of the screen if the glow map has black areas).
  736. .. rst-class:: classref-item-separator
  737. ----
  738. .. _class_Environment_property_glow_mix:
  739. .. rst-class:: classref-property
  740. :ref:`float<class_float>` **glow_mix** = ``0.05``
  741. .. rst-class:: classref-property-setget
  742. - void **set_glow_mix** **(** :ref:`float<class_float>` value **)**
  743. - :ref:`float<class_float>` **get_glow_mix** **(** **)**
  744. When using the :ref:`GLOW_BLEND_MODE_MIX<class_Environment_constant_GLOW_BLEND_MODE_MIX>` :ref:`glow_blend_mode<class_Environment_property_glow_blend_mode>`, this controls how much the source image is blended with the glow layer. A value of ``0.0`` makes the glow rendering invisible, while a value of ``1.0`` is equivalent to :ref:`GLOW_BLEND_MODE_REPLACE<class_Environment_constant_GLOW_BLEND_MODE_REPLACE>`.
  745. .. rst-class:: classref-item-separator
  746. ----
  747. .. _class_Environment_property_glow_normalized:
  748. .. rst-class:: classref-property
  749. :ref:`bool<class_bool>` **glow_normalized** = ``false``
  750. .. rst-class:: classref-property-setget
  751. - void **set_glow_normalized** **(** :ref:`bool<class_bool>` value **)**
  752. - :ref:`bool<class_bool>` **is_glow_normalized** **(** **)**
  753. If ``true``, glow levels will be normalized so that summed together their intensities equal ``1.0``.
  754. .. rst-class:: classref-item-separator
  755. ----
  756. .. _class_Environment_property_glow_strength:
  757. .. rst-class:: classref-property
  758. :ref:`float<class_float>` **glow_strength** = ``1.0``
  759. .. rst-class:: classref-property-setget
  760. - void **set_glow_strength** **(** :ref:`float<class_float>` value **)**
  761. - :ref:`float<class_float>` **get_glow_strength** **(** **)**
  762. The strength of the glow effect. This applies as the glow is blurred across the screen and increases the distance and intensity of the blur. When using the OpenGL renderer, this should be increased to 1.3 to compensate for the lack of HDR rendering.
  763. .. rst-class:: classref-item-separator
  764. ----
  765. .. _class_Environment_property_reflected_light_source:
  766. .. rst-class:: classref-property
  767. :ref:`ReflectionSource<enum_Environment_ReflectionSource>` **reflected_light_source** = ``0``
  768. .. rst-class:: classref-property-setget
  769. - void **set_reflection_source** **(** :ref:`ReflectionSource<enum_Environment_ReflectionSource>` value **)**
  770. - :ref:`ReflectionSource<enum_Environment_ReflectionSource>` **get_reflection_source** **(** **)**
  771. The reflected (specular) light source.
  772. .. rst-class:: classref-item-separator
  773. ----
  774. .. _class_Environment_property_sdfgi_bounce_feedback:
  775. .. rst-class:: classref-property
  776. :ref:`float<class_float>` **sdfgi_bounce_feedback** = ``0.5``
  777. .. rst-class:: classref-property-setget
  778. - void **set_sdfgi_bounce_feedback** **(** :ref:`float<class_float>` value **)**
  779. - :ref:`float<class_float>` **get_sdfgi_bounce_feedback** **(** **)**
  780. The energy multiplier applied to light every time it bounces from a surface when using SDFGI. Values greater than ``0.0`` will simulate multiple bounces, resulting in a more realistic appearance. Increasing :ref:`sdfgi_bounce_feedback<class_Environment_property_sdfgi_bounce_feedback>` generally has no performance impact. See also :ref:`sdfgi_energy<class_Environment_property_sdfgi_energy>`.
  781. \ **Note:** Values greater than ``0.5`` can cause infinite feedback loops and should be avoided in scenes with bright materials.
  782. \ **Note:** If :ref:`sdfgi_bounce_feedback<class_Environment_property_sdfgi_bounce_feedback>` is ``0.0``, indirect lighting will not be represented in reflections as light will only bounce one time.
  783. .. rst-class:: classref-item-separator
  784. ----
  785. .. _class_Environment_property_sdfgi_cascade0_distance:
  786. .. rst-class:: classref-property
  787. :ref:`float<class_float>` **sdfgi_cascade0_distance** = ``12.8``
  788. .. rst-class:: classref-property-setget
  789. - void **set_sdfgi_cascade0_distance** **(** :ref:`float<class_float>` value **)**
  790. - :ref:`float<class_float>` **get_sdfgi_cascade0_distance** **(** **)**
  791. **Note:** This property is linked to :ref:`sdfgi_min_cell_size<class_Environment_property_sdfgi_min_cell_size>` and :ref:`sdfgi_max_distance<class_Environment_property_sdfgi_max_distance>`. Changing its value will automatically change those properties as well.
  792. .. rst-class:: classref-item-separator
  793. ----
  794. .. _class_Environment_property_sdfgi_cascades:
  795. .. rst-class:: classref-property
  796. :ref:`int<class_int>` **sdfgi_cascades** = ``4``
  797. .. rst-class:: classref-property-setget
  798. - void **set_sdfgi_cascades** **(** :ref:`int<class_int>` value **)**
  799. - :ref:`int<class_int>` **get_sdfgi_cascades** **(** **)**
  800. The number of cascades to use for SDFGI (between 1 and 8). A higher number of cascades allows displaying SDFGI further away while preserving detail up close, at the cost of performance. When using SDFGI on small-scale levels, :ref:`sdfgi_cascades<class_Environment_property_sdfgi_cascades>` can often be decreased between ``1`` and ``4`` to improve performance.
  801. .. rst-class:: classref-item-separator
  802. ----
  803. .. _class_Environment_property_sdfgi_enabled:
  804. .. rst-class:: classref-property
  805. :ref:`bool<class_bool>` **sdfgi_enabled** = ``false``
  806. .. rst-class:: classref-property-setget
  807. - void **set_sdfgi_enabled** **(** :ref:`bool<class_bool>` value **)**
  808. - :ref:`bool<class_bool>` **is_sdfgi_enabled** **(** **)**
  809. If ``true``, enables signed distance field global illumination for meshes that have their :ref:`GeometryInstance3D.gi_mode<class_GeometryInstance3D_property_gi_mode>` set to :ref:`GeometryInstance3D.GI_MODE_STATIC<class_GeometryInstance3D_constant_GI_MODE_STATIC>`. SDFGI is a real-time global illumination technique that works well with procedurally generated and user-built levels, including in situations where geometry is created during gameplay. The signed distance field is automatically generated around the camera as it moves. Dynamic lights are supported, but dynamic occluders and emissive surfaces are not.
  810. \ **Performance:** SDFGI is relatively demanding on the GPU and is not suited to low-end hardware such as integrated graphics (consider :ref:`LightmapGI<class_LightmapGI>` instead). To improve SDFGI performance, enable :ref:`ProjectSettings.rendering/global_illumination/gi/use_half_resolution<class_ProjectSettings_property_rendering/global_illumination/gi/use_half_resolution>` in the Project Settings.
  811. \ **Note:** Meshes should have sufficiently thick walls to avoid light leaks (avoid one-sided walls). For interior levels, enclose your level geometry in a sufficiently large box and bridge the loops to close the mesh.
  812. .. rst-class:: classref-item-separator
  813. ----
  814. .. _class_Environment_property_sdfgi_energy:
  815. .. rst-class:: classref-property
  816. :ref:`float<class_float>` **sdfgi_energy** = ``1.0``
  817. .. rst-class:: classref-property-setget
  818. - void **set_sdfgi_energy** **(** :ref:`float<class_float>` value **)**
  819. - :ref:`float<class_float>` **get_sdfgi_energy** **(** **)**
  820. The energy multiplier to use for SDFGI. Higher values will result in brighter indirect lighting and reflections. See also :ref:`sdfgi_bounce_feedback<class_Environment_property_sdfgi_bounce_feedback>`.
  821. .. rst-class:: classref-item-separator
  822. ----
  823. .. _class_Environment_property_sdfgi_max_distance:
  824. .. rst-class:: classref-property
  825. :ref:`float<class_float>` **sdfgi_max_distance** = ``204.8``
  826. .. rst-class:: classref-property-setget
  827. - void **set_sdfgi_max_distance** **(** :ref:`float<class_float>` value **)**
  828. - :ref:`float<class_float>` **get_sdfgi_max_distance** **(** **)**
  829. The maximum distance at which SDFGI is visible. Beyond this distance, environment lighting or other sources of GI such as :ref:`ReflectionProbe<class_ReflectionProbe>` will be used as a fallback.
  830. \ **Note:** This property is linked to :ref:`sdfgi_min_cell_size<class_Environment_property_sdfgi_min_cell_size>` and :ref:`sdfgi_cascade0_distance<class_Environment_property_sdfgi_cascade0_distance>`. Changing its value will automatically change those properties as well.
  831. .. rst-class:: classref-item-separator
  832. ----
  833. .. _class_Environment_property_sdfgi_min_cell_size:
  834. .. rst-class:: classref-property
  835. :ref:`float<class_float>` **sdfgi_min_cell_size** = ``0.2``
  836. .. rst-class:: classref-property-setget
  837. - void **set_sdfgi_min_cell_size** **(** :ref:`float<class_float>` value **)**
  838. - :ref:`float<class_float>` **get_sdfgi_min_cell_size** **(** **)**
  839. The cell size to use for the closest SDFGI cascade (in 3D units). Lower values allow SDFGI to be more precise up close, at the cost of making SDFGI updates more demanding. This can cause stuttering when the camera moves fast. Higher values allow SDFGI to cover more ground, while also reducing the performance impact of SDFGI updates.
  840. \ **Note:** This property is linked to :ref:`sdfgi_max_distance<class_Environment_property_sdfgi_max_distance>` and :ref:`sdfgi_cascade0_distance<class_Environment_property_sdfgi_cascade0_distance>`. Changing its value will automatically change those properties as well.
  841. .. rst-class:: classref-item-separator
  842. ----
  843. .. _class_Environment_property_sdfgi_normal_bias:
  844. .. rst-class:: classref-property
  845. :ref:`float<class_float>` **sdfgi_normal_bias** = ``1.1``
  846. .. rst-class:: classref-property-setget
  847. - void **set_sdfgi_normal_bias** **(** :ref:`float<class_float>` value **)**
  848. - :ref:`float<class_float>` **get_sdfgi_normal_bias** **(** **)**
  849. The normal bias to use for SDFGI probes. Increasing this value can reduce visible streaking artifacts on sloped surfaces, at the cost of increased light leaking.
  850. .. rst-class:: classref-item-separator
  851. ----
  852. .. _class_Environment_property_sdfgi_probe_bias:
  853. .. rst-class:: classref-property
  854. :ref:`float<class_float>` **sdfgi_probe_bias** = ``1.1``
  855. .. rst-class:: classref-property-setget
  856. - void **set_sdfgi_probe_bias** **(** :ref:`float<class_float>` value **)**
  857. - :ref:`float<class_float>` **get_sdfgi_probe_bias** **(** **)**
  858. The constant bias to use for SDFGI probes. Increasing this value can reduce visible streaking artifacts on sloped surfaces, at the cost of increased light leaking.
  859. .. rst-class:: classref-item-separator
  860. ----
  861. .. _class_Environment_property_sdfgi_read_sky_light:
  862. .. rst-class:: classref-property
  863. :ref:`bool<class_bool>` **sdfgi_read_sky_light** = ``true``
  864. .. rst-class:: classref-property-setget
  865. - void **set_sdfgi_read_sky_light** **(** :ref:`bool<class_bool>` value **)**
  866. - :ref:`bool<class_bool>` **is_sdfgi_reading_sky_light** **(** **)**
  867. If ``true``, SDFGI takes the environment lighting into account. This should be set to ``false`` for interior scenes.
  868. .. rst-class:: classref-item-separator
  869. ----
  870. .. _class_Environment_property_sdfgi_use_occlusion:
  871. .. rst-class:: classref-property
  872. :ref:`bool<class_bool>` **sdfgi_use_occlusion** = ``false``
  873. .. rst-class:: classref-property-setget
  874. - void **set_sdfgi_use_occlusion** **(** :ref:`bool<class_bool>` value **)**
  875. - :ref:`bool<class_bool>` **is_sdfgi_using_occlusion** **(** **)**
  876. If ``true``, SDFGI uses an occlusion detection approach to reduce light leaking. Occlusion may however introduce dark blotches in certain spots, which may be undesired in mostly outdoor scenes. :ref:`sdfgi_use_occlusion<class_Environment_property_sdfgi_use_occlusion>` has a performance impact and should only be enabled when needed.
  877. .. rst-class:: classref-item-separator
  878. ----
  879. .. _class_Environment_property_sdfgi_y_scale:
  880. .. rst-class:: classref-property
  881. :ref:`SDFGIYScale<enum_Environment_SDFGIYScale>` **sdfgi_y_scale** = ``1``
  882. .. rst-class:: classref-property-setget
  883. - void **set_sdfgi_y_scale** **(** :ref:`SDFGIYScale<enum_Environment_SDFGIYScale>` value **)**
  884. - :ref:`SDFGIYScale<enum_Environment_SDFGIYScale>` **get_sdfgi_y_scale** **(** **)**
  885. The Y scale to use for SDFGI cells. Lower values will result in SDFGI cells being packed together more closely on the Y axis. This is used to balance between quality and covering a lot of vertical ground. :ref:`sdfgi_y_scale<class_Environment_property_sdfgi_y_scale>` should be set depending on how vertical your scene is (and how fast your camera may move on the Y axis).
  886. .. rst-class:: classref-item-separator
  887. ----
  888. .. _class_Environment_property_sky:
  889. .. rst-class:: classref-property
  890. :ref:`Sky<class_Sky>` **sky**
  891. .. rst-class:: classref-property-setget
  892. - void **set_sky** **(** :ref:`Sky<class_Sky>` value **)**
  893. - :ref:`Sky<class_Sky>` **get_sky** **(** **)**
  894. The :ref:`Sky<class_Sky>` resource used for this **Environment**.
  895. .. rst-class:: classref-item-separator
  896. ----
  897. .. _class_Environment_property_sky_custom_fov:
  898. .. rst-class:: classref-property
  899. :ref:`float<class_float>` **sky_custom_fov** = ``0.0``
  900. .. rst-class:: classref-property-setget
  901. - void **set_sky_custom_fov** **(** :ref:`float<class_float>` value **)**
  902. - :ref:`float<class_float>` **get_sky_custom_fov** **(** **)**
  903. If set to a value greater than ``0.0``, overrides the field of view to use for sky rendering. If set to ``0.0``, the same FOV as the current :ref:`Camera3D<class_Camera3D>` is used for sky rendering.
  904. .. rst-class:: classref-item-separator
  905. ----
  906. .. _class_Environment_property_sky_rotation:
  907. .. rst-class:: classref-property
  908. :ref:`Vector3<class_Vector3>` **sky_rotation** = ``Vector3(0, 0, 0)``
  909. .. rst-class:: classref-property-setget
  910. - void **set_sky_rotation** **(** :ref:`Vector3<class_Vector3>` value **)**
  911. - :ref:`Vector3<class_Vector3>` **get_sky_rotation** **(** **)**
  912. The rotation to use for sky rendering.
  913. .. rst-class:: classref-item-separator
  914. ----
  915. .. _class_Environment_property_ssao_ao_channel_affect:
  916. .. rst-class:: classref-property
  917. :ref:`float<class_float>` **ssao_ao_channel_affect** = ``0.0``
  918. .. rst-class:: classref-property-setget
  919. - void **set_ssao_ao_channel_affect** **(** :ref:`float<class_float>` value **)**
  920. - :ref:`float<class_float>` **get_ssao_ao_channel_affect** **(** **)**
  921. The screen-space ambient occlusion intensity on materials that have an AO texture defined. Values higher than ``0`` will make the SSAO effect visible in areas darkened by AO textures.
  922. .. rst-class:: classref-item-separator
  923. ----
  924. .. _class_Environment_property_ssao_detail:
  925. .. rst-class:: classref-property
  926. :ref:`float<class_float>` **ssao_detail** = ``0.5``
  927. .. rst-class:: classref-property-setget
  928. - void **set_ssao_detail** **(** :ref:`float<class_float>` value **)**
  929. - :ref:`float<class_float>` **get_ssao_detail** **(** **)**
  930. Sets the strength of the additional level of detail for the screen-space ambient occlusion effect. A high value makes the detail pass more prominent, but it may contribute to aliasing in your final image.
  931. .. rst-class:: classref-item-separator
  932. ----
  933. .. _class_Environment_property_ssao_enabled:
  934. .. rst-class:: classref-property
  935. :ref:`bool<class_bool>` **ssao_enabled** = ``false``
  936. .. rst-class:: classref-property-setget
  937. - void **set_ssao_enabled** **(** :ref:`bool<class_bool>` value **)**
  938. - :ref:`bool<class_bool>` **is_ssao_enabled** **(** **)**
  939. If ``true``, the screen-space ambient occlusion effect is enabled. This darkens objects' corners and cavities to simulate ambient light not reaching the entire object as in real life. This works well for small, dynamic objects, but baked lighting or ambient occlusion textures will do a better job at displaying ambient occlusion on large static objects. Godot uses a form of SSAO called Adaptive Screen Space Ambient Occlusion which is itself a form of Horizon Based Ambient Occlusion.
  940. .. rst-class:: classref-item-separator
  941. ----
  942. .. _class_Environment_property_ssao_horizon:
  943. .. rst-class:: classref-property
  944. :ref:`float<class_float>` **ssao_horizon** = ``0.06``
  945. .. rst-class:: classref-property-setget
  946. - void **set_ssao_horizon** **(** :ref:`float<class_float>` value **)**
  947. - :ref:`float<class_float>` **get_ssao_horizon** **(** **)**
  948. The threshold for considering whether a given point on a surface is occluded or not represented as an angle from the horizon mapped into the ``0.0-1.0`` range. A value of ``1.0`` results in no occlusion.
  949. .. rst-class:: classref-item-separator
  950. ----
  951. .. _class_Environment_property_ssao_intensity:
  952. .. rst-class:: classref-property
  953. :ref:`float<class_float>` **ssao_intensity** = ``2.0``
  954. .. rst-class:: classref-property-setget
  955. - void **set_ssao_intensity** **(** :ref:`float<class_float>` value **)**
  956. - :ref:`float<class_float>` **get_ssao_intensity** **(** **)**
  957. The primary screen-space ambient occlusion intensity. Acts as a multiplier for the screen-space ambient occlusion effect. A higher value results in darker occlusion.
  958. .. rst-class:: classref-item-separator
  959. ----
  960. .. _class_Environment_property_ssao_light_affect:
  961. .. rst-class:: classref-property
  962. :ref:`float<class_float>` **ssao_light_affect** = ``0.0``
  963. .. rst-class:: classref-property-setget
  964. - void **set_ssao_direct_light_affect** **(** :ref:`float<class_float>` value **)**
  965. - :ref:`float<class_float>` **get_ssao_direct_light_affect** **(** **)**
  966. The screen-space ambient occlusion intensity in direct light. In real life, ambient occlusion only applies to indirect light, which means its effects can't be seen in direct light. Values higher than ``0`` will make the SSAO effect visible in direct light.
  967. .. rst-class:: classref-item-separator
  968. ----
  969. .. _class_Environment_property_ssao_power:
  970. .. rst-class:: classref-property
  971. :ref:`float<class_float>` **ssao_power** = ``1.5``
  972. .. rst-class:: classref-property-setget
  973. - void **set_ssao_power** **(** :ref:`float<class_float>` value **)**
  974. - :ref:`float<class_float>` **get_ssao_power** **(** **)**
  975. The distribution of occlusion. A higher value results in darker occlusion, similar to :ref:`ssao_intensity<class_Environment_property_ssao_intensity>`, but with a sharper falloff.
  976. .. rst-class:: classref-item-separator
  977. ----
  978. .. _class_Environment_property_ssao_radius:
  979. .. rst-class:: classref-property
  980. :ref:`float<class_float>` **ssao_radius** = ``1.0``
  981. .. rst-class:: classref-property-setget
  982. - void **set_ssao_radius** **(** :ref:`float<class_float>` value **)**
  983. - :ref:`float<class_float>` **get_ssao_radius** **(** **)**
  984. The distance at which objects can occlude each other when calculating screen-space ambient occlusion. Higher values will result in occlusion over a greater distance at the cost of performance and quality.
  985. .. rst-class:: classref-item-separator
  986. ----
  987. .. _class_Environment_property_ssao_sharpness:
  988. .. rst-class:: classref-property
  989. :ref:`float<class_float>` **ssao_sharpness** = ``0.98``
  990. .. rst-class:: classref-property-setget
  991. - void **set_ssao_sharpness** **(** :ref:`float<class_float>` value **)**
  992. - :ref:`float<class_float>` **get_ssao_sharpness** **(** **)**
  993. The amount that the screen-space ambient occlusion effect is allowed to blur over the edges of objects. Setting too high will result in aliasing around the edges of objects. Setting too low will make object edges appear blurry.
  994. .. rst-class:: classref-item-separator
  995. ----
  996. .. _class_Environment_property_ssil_enabled:
  997. .. rst-class:: classref-property
  998. :ref:`bool<class_bool>` **ssil_enabled** = ``false``
  999. .. rst-class:: classref-property-setget
  1000. - void **set_ssil_enabled** **(** :ref:`bool<class_bool>` value **)**
  1001. - :ref:`bool<class_bool>` **is_ssil_enabled** **(** **)**
  1002. If ``true``, the screen-space indirect lighting effect is enabled. Screen space indirect lighting is a form of indirect lighting that allows diffuse light to bounce between nearby objects. Screen-space indirect lighting works very similarly to screen-space ambient occlusion, in that it only affects a limited range. It is intended to be used along with a form of proper global illumination like SDFGI or :ref:`VoxelGI<class_VoxelGI>`. Screen-space indirect lighting is not affected by individual light's :ref:`Light3D.light_indirect_energy<class_Light3D_property_light_indirect_energy>`.
  1003. .. rst-class:: classref-item-separator
  1004. ----
  1005. .. _class_Environment_property_ssil_intensity:
  1006. .. rst-class:: classref-property
  1007. :ref:`float<class_float>` **ssil_intensity** = ``1.0``
  1008. .. rst-class:: classref-property-setget
  1009. - void **set_ssil_intensity** **(** :ref:`float<class_float>` value **)**
  1010. - :ref:`float<class_float>` **get_ssil_intensity** **(** **)**
  1011. The brightness multiplier for the screen-space indirect lighting effect. A higher value will result in brighter light.
  1012. .. rst-class:: classref-item-separator
  1013. ----
  1014. .. _class_Environment_property_ssil_normal_rejection:
  1015. .. rst-class:: classref-property
  1016. :ref:`float<class_float>` **ssil_normal_rejection** = ``1.0``
  1017. .. rst-class:: classref-property-setget
  1018. - void **set_ssil_normal_rejection** **(** :ref:`float<class_float>` value **)**
  1019. - :ref:`float<class_float>` **get_ssil_normal_rejection** **(** **)**
  1020. Amount of normal rejection used when calculating screen-space indirect lighting. Normal rejection uses the normal of a given sample point to reject samples that are facing away from the current pixel. Normal rejection is necessary to avoid light leaking when only one side of an object is illuminated. However, normal rejection can be disabled if light leaking is desirable, such as when the scene mostly contains emissive objects that emit light from faces that cannot be seen from the camera.
  1021. .. rst-class:: classref-item-separator
  1022. ----
  1023. .. _class_Environment_property_ssil_radius:
  1024. .. rst-class:: classref-property
  1025. :ref:`float<class_float>` **ssil_radius** = ``5.0``
  1026. .. rst-class:: classref-property-setget
  1027. - void **set_ssil_radius** **(** :ref:`float<class_float>` value **)**
  1028. - :ref:`float<class_float>` **get_ssil_radius** **(** **)**
  1029. The distance that bounced lighting can travel when using the screen space indirect lighting effect. A larger value will result in light bouncing further in a scene, but may result in under-sampling artifacts which look like long spikes surrounding light sources.
  1030. .. rst-class:: classref-item-separator
  1031. ----
  1032. .. _class_Environment_property_ssil_sharpness:
  1033. .. rst-class:: classref-property
  1034. :ref:`float<class_float>` **ssil_sharpness** = ``0.98``
  1035. .. rst-class:: classref-property-setget
  1036. - void **set_ssil_sharpness** **(** :ref:`float<class_float>` value **)**
  1037. - :ref:`float<class_float>` **get_ssil_sharpness** **(** **)**
  1038. The amount that the screen-space indirect lighting effect is allowed to blur over the edges of objects. Setting too high will result in aliasing around the edges of objects. Setting too low will make object edges appear blurry.
  1039. .. rst-class:: classref-item-separator
  1040. ----
  1041. .. _class_Environment_property_ssr_depth_tolerance:
  1042. .. rst-class:: classref-property
  1043. :ref:`float<class_float>` **ssr_depth_tolerance** = ``0.2``
  1044. .. rst-class:: classref-property-setget
  1045. - void **set_ssr_depth_tolerance** **(** :ref:`float<class_float>` value **)**
  1046. - :ref:`float<class_float>` **get_ssr_depth_tolerance** **(** **)**
  1047. The depth tolerance for screen-space reflections.
  1048. .. rst-class:: classref-item-separator
  1049. ----
  1050. .. _class_Environment_property_ssr_enabled:
  1051. .. rst-class:: classref-property
  1052. :ref:`bool<class_bool>` **ssr_enabled** = ``false``
  1053. .. rst-class:: classref-property-setget
  1054. - void **set_ssr_enabled** **(** :ref:`bool<class_bool>` value **)**
  1055. - :ref:`bool<class_bool>` **is_ssr_enabled** **(** **)**
  1056. If ``true``, screen-space reflections are enabled. Screen-space reflections are more accurate than reflections from :ref:`VoxelGI<class_VoxelGI>`\ s or :ref:`ReflectionProbe<class_ReflectionProbe>`\ s, but are slower and can't reflect surfaces occluded by others.
  1057. .. rst-class:: classref-item-separator
  1058. ----
  1059. .. _class_Environment_property_ssr_fade_in:
  1060. .. rst-class:: classref-property
  1061. :ref:`float<class_float>` **ssr_fade_in** = ``0.15``
  1062. .. rst-class:: classref-property-setget
  1063. - void **set_ssr_fade_in** **(** :ref:`float<class_float>` value **)**
  1064. - :ref:`float<class_float>` **get_ssr_fade_in** **(** **)**
  1065. The fade-in distance for screen-space reflections. Affects the area from the reflected material to the screen-space reflection). Only positive values are valid (negative values will be clamped to ``0.0``).
  1066. .. rst-class:: classref-item-separator
  1067. ----
  1068. .. _class_Environment_property_ssr_fade_out:
  1069. .. rst-class:: classref-property
  1070. :ref:`float<class_float>` **ssr_fade_out** = ``2.0``
  1071. .. rst-class:: classref-property-setget
  1072. - void **set_ssr_fade_out** **(** :ref:`float<class_float>` value **)**
  1073. - :ref:`float<class_float>` **get_ssr_fade_out** **(** **)**
  1074. The fade-out distance for screen-space reflections. Affects the area from the screen-space reflection to the "global" reflection. Only positive values are valid (negative values will be clamped to ``0.0``).
  1075. .. rst-class:: classref-item-separator
  1076. ----
  1077. .. _class_Environment_property_ssr_max_steps:
  1078. .. rst-class:: classref-property
  1079. :ref:`int<class_int>` **ssr_max_steps** = ``64``
  1080. .. rst-class:: classref-property-setget
  1081. - void **set_ssr_max_steps** **(** :ref:`int<class_int>` value **)**
  1082. - :ref:`int<class_int>` **get_ssr_max_steps** **(** **)**
  1083. The maximum number of steps for screen-space reflections. Higher values are slower.
  1084. .. rst-class:: classref-item-separator
  1085. ----
  1086. .. _class_Environment_property_tonemap_exposure:
  1087. .. rst-class:: classref-property
  1088. :ref:`float<class_float>` **tonemap_exposure** = ``1.0``
  1089. .. rst-class:: classref-property-setget
  1090. - void **set_tonemap_exposure** **(** :ref:`float<class_float>` value **)**
  1091. - :ref:`float<class_float>` **get_tonemap_exposure** **(** **)**
  1092. The default exposure used for tonemapping. Higher values result in a brighter image. See also :ref:`tonemap_white<class_Environment_property_tonemap_white>`.
  1093. .. rst-class:: classref-item-separator
  1094. ----
  1095. .. _class_Environment_property_tonemap_mode:
  1096. .. rst-class:: classref-property
  1097. :ref:`ToneMapper<enum_Environment_ToneMapper>` **tonemap_mode** = ``0``
  1098. .. rst-class:: classref-property-setget
  1099. - void **set_tonemapper** **(** :ref:`ToneMapper<enum_Environment_ToneMapper>` value **)**
  1100. - :ref:`ToneMapper<enum_Environment_ToneMapper>` **get_tonemapper** **(** **)**
  1101. The tonemapping mode to use. Tonemapping is the process that "converts" HDR values to be suitable for rendering on a LDR display. (Godot doesn't support rendering on HDR displays yet.)
  1102. .. rst-class:: classref-item-separator
  1103. ----
  1104. .. _class_Environment_property_tonemap_white:
  1105. .. rst-class:: classref-property
  1106. :ref:`float<class_float>` **tonemap_white** = ``1.0``
  1107. .. rst-class:: classref-property-setget
  1108. - void **set_tonemap_white** **(** :ref:`float<class_float>` value **)**
  1109. - :ref:`float<class_float>` **get_tonemap_white** **(** **)**
  1110. The white reference value for tonemapping (also called "whitepoint"). Higher values can make highlights look less blown out, and will also slightly darken the whole scene as a result. Only effective if the :ref:`tonemap_mode<class_Environment_property_tonemap_mode>` isn't set to :ref:`TONE_MAPPER_LINEAR<class_Environment_constant_TONE_MAPPER_LINEAR>`. See also :ref:`tonemap_exposure<class_Environment_property_tonemap_exposure>`.
  1111. .. rst-class:: classref-item-separator
  1112. ----
  1113. .. _class_Environment_property_volumetric_fog_albedo:
  1114. .. rst-class:: classref-property
  1115. :ref:`Color<class_Color>` **volumetric_fog_albedo** = ``Color(1, 1, 1, 1)``
  1116. .. rst-class:: classref-property-setget
  1117. - void **set_volumetric_fog_albedo** **(** :ref:`Color<class_Color>` value **)**
  1118. - :ref:`Color<class_Color>` **get_volumetric_fog_albedo** **(** **)**
  1119. The :ref:`Color<class_Color>` of the volumetric fog when interacting with lights. Mist and fog have an albedo close to ``Color(1, 1, 1, 1)`` while smoke has a darker albedo.
  1120. .. rst-class:: classref-item-separator
  1121. ----
  1122. .. _class_Environment_property_volumetric_fog_ambient_inject:
  1123. .. rst-class:: classref-property
  1124. :ref:`float<class_float>` **volumetric_fog_ambient_inject** = ``0.0``
  1125. .. rst-class:: classref-property-setget
  1126. - void **set_volumetric_fog_ambient_inject** **(** :ref:`float<class_float>` value **)**
  1127. - :ref:`float<class_float>` **get_volumetric_fog_ambient_inject** **(** **)**
  1128. Scales the strength of ambient light used in the volumetric fog. A value of ``0.0`` means that ambient light will not impact the volumetric fog. :ref:`volumetric_fog_ambient_inject<class_Environment_property_volumetric_fog_ambient_inject>` has a small performance cost when set above ``0.0``.
  1129. \ **Note:** This has no visible effect if :ref:`volumetric_fog_density<class_Environment_property_volumetric_fog_density>` is ``0.0`` or if :ref:`volumetric_fog_albedo<class_Environment_property_volumetric_fog_albedo>` is a fully black color.
  1130. .. rst-class:: classref-item-separator
  1131. ----
  1132. .. _class_Environment_property_volumetric_fog_anisotropy:
  1133. .. rst-class:: classref-property
  1134. :ref:`float<class_float>` **volumetric_fog_anisotropy** = ``0.2``
  1135. .. rst-class:: classref-property-setget
  1136. - void **set_volumetric_fog_anisotropy** **(** :ref:`float<class_float>` value **)**
  1137. - :ref:`float<class_float>` **get_volumetric_fog_anisotropy** **(** **)**
  1138. The direction of scattered light as it goes through the volumetric fog. A value close to ``1.0`` means almost all light is scattered forward. A value close to ``0.0`` means light is scattered equally in all directions. A value close to ``-1.0`` means light is scattered mostly backward. Fog and mist scatter light slightly forward, while smoke scatters light equally in all directions.
  1139. .. rst-class:: classref-item-separator
  1140. ----
  1141. .. _class_Environment_property_volumetric_fog_density:
  1142. .. rst-class:: classref-property
  1143. :ref:`float<class_float>` **volumetric_fog_density** = ``0.05``
  1144. .. rst-class:: classref-property-setget
  1145. - void **set_volumetric_fog_density** **(** :ref:`float<class_float>` value **)**
  1146. - :ref:`float<class_float>` **get_volumetric_fog_density** **(** **)**
  1147. The base *exponential* density of the volumetric fog. Set this to the lowest density you want to have globally. :ref:`FogVolume<class_FogVolume>`\ s can be used to add to or subtract from this density in specific areas. Fog rendering is exponential as in real life.
  1148. A value of ``0.0`` disables global volumetric fog while allowing :ref:`FogVolume<class_FogVolume>`\ s to display volumetric fog in specific areas.
  1149. To make volumetric fog work as a volumetric *lighting* solution, set :ref:`volumetric_fog_density<class_Environment_property_volumetric_fog_density>` to the lowest non-zero value (``0.0001``) then increase lights' :ref:`Light3D.light_volumetric_fog_energy<class_Light3D_property_light_volumetric_fog_energy>` to values between ``10000`` and ``100000`` to compensate for the very low density.
  1150. .. rst-class:: classref-item-separator
  1151. ----
  1152. .. _class_Environment_property_volumetric_fog_detail_spread:
  1153. .. rst-class:: classref-property
  1154. :ref:`float<class_float>` **volumetric_fog_detail_spread** = ``2.0``
  1155. .. rst-class:: classref-property-setget
  1156. - void **set_volumetric_fog_detail_spread** **(** :ref:`float<class_float>` value **)**
  1157. - :ref:`float<class_float>` **get_volumetric_fog_detail_spread** **(** **)**
  1158. The distribution of size down the length of the froxel buffer. A higher value compresses the froxels closer to the camera and places more detail closer to the camera.
  1159. .. rst-class:: classref-item-separator
  1160. ----
  1161. .. _class_Environment_property_volumetric_fog_emission:
  1162. .. rst-class:: classref-property
  1163. :ref:`Color<class_Color>` **volumetric_fog_emission** = ``Color(0, 0, 0, 1)``
  1164. .. rst-class:: classref-property-setget
  1165. - void **set_volumetric_fog_emission** **(** :ref:`Color<class_Color>` value **)**
  1166. - :ref:`Color<class_Color>` **get_volumetric_fog_emission** **(** **)**
  1167. The emitted light from the volumetric fog. Even with emission, volumetric fog will not cast light onto other surfaces. Emission is useful to establish an ambient color. As the volumetric fog effect uses single-scattering only, fog tends to need a little bit of emission to soften the harsh shadows.
  1168. .. rst-class:: classref-item-separator
  1169. ----
  1170. .. _class_Environment_property_volumetric_fog_emission_energy:
  1171. .. rst-class:: classref-property
  1172. :ref:`float<class_float>` **volumetric_fog_emission_energy** = ``1.0``
  1173. .. rst-class:: classref-property-setget
  1174. - void **set_volumetric_fog_emission_energy** **(** :ref:`float<class_float>` value **)**
  1175. - :ref:`float<class_float>` **get_volumetric_fog_emission_energy** **(** **)**
  1176. The brightness of the emitted light from the volumetric fog.
  1177. .. rst-class:: classref-item-separator
  1178. ----
  1179. .. _class_Environment_property_volumetric_fog_enabled:
  1180. .. rst-class:: classref-property
  1181. :ref:`bool<class_bool>` **volumetric_fog_enabled** = ``false``
  1182. .. rst-class:: classref-property-setget
  1183. - void **set_volumetric_fog_enabled** **(** :ref:`bool<class_bool>` value **)**
  1184. - :ref:`bool<class_bool>` **is_volumetric_fog_enabled** **(** **)**
  1185. Enables the volumetric fog effect. Volumetric fog uses a screen-aligned froxel buffer to calculate accurate volumetric scattering in the short to medium range. Volumetric fog interacts with :ref:`FogVolume<class_FogVolume>`\ s and lights to calculate localized and global fog. Volumetric fog uses a PBR single-scattering model based on extinction, scattering, and emission which it exposes to users as density, albedo, and emission.
  1186. \ **Note:** Volumetric fog is only available in the forward plus renderer. It is not available in the mobile renderer or the compatibility renderer.
  1187. .. rst-class:: classref-item-separator
  1188. ----
  1189. .. _class_Environment_property_volumetric_fog_gi_inject:
  1190. .. rst-class:: classref-property
  1191. :ref:`float<class_float>` **volumetric_fog_gi_inject** = ``1.0``
  1192. .. rst-class:: classref-property-setget
  1193. - void **set_volumetric_fog_gi_inject** **(** :ref:`float<class_float>` value **)**
  1194. - :ref:`float<class_float>` **get_volumetric_fog_gi_inject** **(** **)**
  1195. Scales the strength of Global Illumination used in the volumetric fog's albedo color. A value of ``0.0`` means that Global Illumination will not impact the volumetric fog. :ref:`volumetric_fog_gi_inject<class_Environment_property_volumetric_fog_gi_inject>` has a small performance cost when set above ``0.0``.
  1196. \ **Note:** This has no visible effect if :ref:`volumetric_fog_density<class_Environment_property_volumetric_fog_density>` is ``0.0`` or if :ref:`volumetric_fog_albedo<class_Environment_property_volumetric_fog_albedo>` is a fully black color.
  1197. \ **Note:** Only :ref:`VoxelGI<class_VoxelGI>` and SDFGI (:ref:`sdfgi_enabled<class_Environment_property_sdfgi_enabled>`) are taken into account when using :ref:`volumetric_fog_gi_inject<class_Environment_property_volumetric_fog_gi_inject>`. Global illumination from :ref:`LightmapGI<class_LightmapGI>`, :ref:`ReflectionProbe<class_ReflectionProbe>` and SSIL (see :ref:`ssil_enabled<class_Environment_property_ssil_enabled>`) will be ignored by volumetric fog.
  1198. .. rst-class:: classref-item-separator
  1199. ----
  1200. .. _class_Environment_property_volumetric_fog_length:
  1201. .. rst-class:: classref-property
  1202. :ref:`float<class_float>` **volumetric_fog_length** = ``64.0``
  1203. .. rst-class:: classref-property-setget
  1204. - void **set_volumetric_fog_length** **(** :ref:`float<class_float>` value **)**
  1205. - :ref:`float<class_float>` **get_volumetric_fog_length** **(** **)**
  1206. The distance over which the volumetric fog is computed. Increase to compute fog over a greater range, decrease to add more detail when a long range is not needed. For best quality fog, keep this as low as possible. See also :ref:`ProjectSettings.rendering/environment/volumetric_fog/volume_depth<class_ProjectSettings_property_rendering/environment/volumetric_fog/volume_depth>`.
  1207. .. rst-class:: classref-item-separator
  1208. ----
  1209. .. _class_Environment_property_volumetric_fog_sky_affect:
  1210. .. rst-class:: classref-property
  1211. :ref:`float<class_float>` **volumetric_fog_sky_affect** = ``1.0``
  1212. .. rst-class:: classref-property-setget
  1213. - void **set_volumetric_fog_sky_affect** **(** :ref:`float<class_float>` value **)**
  1214. - :ref:`float<class_float>` **get_volumetric_fog_sky_affect** **(** **)**
  1215. The factor to use when affecting the sky with volumetric fog. ``1.0`` means that volumetric fog can fully obscure the sky. Lower values reduce the impact of volumetric fog on sky rendering, with ``0.0`` not affecting sky rendering at all.
  1216. \ **Note:** :ref:`volumetric_fog_sky_affect<class_Environment_property_volumetric_fog_sky_affect>` also affects :ref:`FogVolume<class_FogVolume>`\ s, even if :ref:`volumetric_fog_density<class_Environment_property_volumetric_fog_density>` is ``0.0``. If you notice :ref:`FogVolume<class_FogVolume>`\ s are disappearing when looking towards the sky, set :ref:`volumetric_fog_sky_affect<class_Environment_property_volumetric_fog_sky_affect>` to ``1.0``.
  1217. .. rst-class:: classref-item-separator
  1218. ----
  1219. .. _class_Environment_property_volumetric_fog_temporal_reprojection_amount:
  1220. .. rst-class:: classref-property
  1221. :ref:`float<class_float>` **volumetric_fog_temporal_reprojection_amount** = ``0.9``
  1222. .. rst-class:: classref-property-setget
  1223. - void **set_volumetric_fog_temporal_reprojection_amount** **(** :ref:`float<class_float>` value **)**
  1224. - :ref:`float<class_float>` **get_volumetric_fog_temporal_reprojection_amount** **(** **)**
  1225. The amount by which to blend the last frame with the current frame. A higher number results in smoother volumetric fog, but makes "ghosting" much worse. A lower value reduces ghosting but can result in the per-frame temporal jitter becoming visible.
  1226. .. rst-class:: classref-item-separator
  1227. ----
  1228. .. _class_Environment_property_volumetric_fog_temporal_reprojection_enabled:
  1229. .. rst-class:: classref-property
  1230. :ref:`bool<class_bool>` **volumetric_fog_temporal_reprojection_enabled** = ``true``
  1231. .. rst-class:: classref-property-setget
  1232. - void **set_volumetric_fog_temporal_reprojection_enabled** **(** :ref:`bool<class_bool>` value **)**
  1233. - :ref:`bool<class_bool>` **is_volumetric_fog_temporal_reprojection_enabled** **(** **)**
  1234. Enables temporal reprojection in the volumetric fog. Temporal reprojection blends the current frame's volumetric fog with the last frame's volumetric fog to smooth out jagged edges. The performance cost is minimal; however, it leads to moving :ref:`FogVolume<class_FogVolume>`\ s and :ref:`Light3D<class_Light3D>`\ s "ghosting" and leaving a trail behind them. When temporal reprojection is enabled, try to avoid moving :ref:`FogVolume<class_FogVolume>`\ s or :ref:`Light3D<class_Light3D>`\ s too fast. Short-lived dynamic lighting effects should have :ref:`Light3D.light_volumetric_fog_energy<class_Light3D_property_light_volumetric_fog_energy>` set to ``0.0`` to avoid ghosting.
  1235. .. rst-class:: classref-section-separator
  1236. ----
  1237. .. rst-class:: classref-descriptions-group
  1238. Method Descriptions
  1239. -------------------
  1240. .. _class_Environment_method_get_glow_level:
  1241. .. rst-class:: classref-method
  1242. :ref:`float<class_float>` **get_glow_level** **(** :ref:`int<class_int>` idx **)** |const|
  1243. Returns the intensity of the glow level ``idx``.
  1244. .. rst-class:: classref-item-separator
  1245. ----
  1246. .. _class_Environment_method_set_glow_level:
  1247. .. rst-class:: classref-method
  1248. void **set_glow_level** **(** :ref:`int<class_int>` idx, :ref:`float<class_float>` intensity **)**
  1249. Sets the intensity of the glow level ``idx``. A value above ``0.0`` enables the level. Each level relies on the previous level. This means that enabling higher glow levels will slow down the glow effect rendering, even if previous levels aren't enabled.
  1250. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  1251. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  1252. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  1253. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  1254. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  1255. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`