class_environment.rst 133 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374
  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. - Auto Exposure
  17. - Glow
  18. - Tonemap
  19. - Adjustments
  20. .. rst-class:: classref-introduction-group
  21. Tutorials
  22. ---------
  23. - :doc:`Environment and post-processing <../tutorials/3d/environment_and_post_processing>`
  24. - :doc:`High dynamic range lighting <../tutorials/3d/high_dynamic_range>`
  25. - `3D Material Testers Demo <https://godotengine.org/asset-library/asset/2742>`__
  26. - `Third Person Shooter (TPS) Demo <https://godotengine.org/asset-library/asset/2710>`__
  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:`float<class_float>` | :ref:`fog_depth_begin<class_Environment_property_fog_depth_begin>` | ``10.0`` |
  68. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  69. | :ref:`float<class_float>` | :ref:`fog_depth_curve<class_Environment_property_fog_depth_curve>` | ``1.0`` |
  70. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  71. | :ref:`float<class_float>` | :ref:`fog_depth_end<class_Environment_property_fog_depth_end>` | ``100.0`` |
  72. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  73. | :ref:`bool<class_bool>` | :ref:`fog_enabled<class_Environment_property_fog_enabled>` | ``false`` |
  74. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  75. | :ref:`float<class_float>` | :ref:`fog_height<class_Environment_property_fog_height>` | ``0.0`` |
  76. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  77. | :ref:`float<class_float>` | :ref:`fog_height_density<class_Environment_property_fog_height_density>` | ``0.0`` |
  78. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  79. | :ref:`Color<class_Color>` | :ref:`fog_light_color<class_Environment_property_fog_light_color>` | ``Color(0.518, 0.553, 0.608, 1)`` |
  80. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  81. | :ref:`float<class_float>` | :ref:`fog_light_energy<class_Environment_property_fog_light_energy>` | ``1.0`` |
  82. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  83. | :ref:`FogMode<enum_Environment_FogMode>` | :ref:`fog_mode<class_Environment_property_fog_mode>` | ``0`` |
  84. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  85. | :ref:`float<class_float>` | :ref:`fog_sky_affect<class_Environment_property_fog_sky_affect>` | ``1.0`` |
  86. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  87. | :ref:`float<class_float>` | :ref:`fog_sun_scatter<class_Environment_property_fog_sun_scatter>` | ``0.0`` |
  88. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  89. | :ref:`GlowBlendMode<enum_Environment_GlowBlendMode>` | :ref:`glow_blend_mode<class_Environment_property_glow_blend_mode>` | ``1`` |
  90. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  91. | :ref:`float<class_float>` | :ref:`glow_bloom<class_Environment_property_glow_bloom>` | ``0.0`` |
  92. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  93. | :ref:`bool<class_bool>` | :ref:`glow_enabled<class_Environment_property_glow_enabled>` | ``false`` |
  94. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  95. | :ref:`float<class_float>` | :ref:`glow_hdr_luminance_cap<class_Environment_property_glow_hdr_luminance_cap>` | ``12.0`` |
  96. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  97. | :ref:`float<class_float>` | :ref:`glow_hdr_scale<class_Environment_property_glow_hdr_scale>` | ``2.0`` |
  98. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  99. | :ref:`float<class_float>` | :ref:`glow_hdr_threshold<class_Environment_property_glow_hdr_threshold>` | ``1.0`` |
  100. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  101. | :ref:`float<class_float>` | :ref:`glow_intensity<class_Environment_property_glow_intensity>` | ``0.3`` |
  102. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  103. | :ref:`float<class_float>` | :ref:`glow_levels/1<class_Environment_property_glow_levels/1>` | ``1.0`` |
  104. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  105. | :ref:`float<class_float>` | :ref:`glow_levels/2<class_Environment_property_glow_levels/2>` | ``0.8`` |
  106. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  107. | :ref:`float<class_float>` | :ref:`glow_levels/3<class_Environment_property_glow_levels/3>` | ``0.4`` |
  108. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  109. | :ref:`float<class_float>` | :ref:`glow_levels/4<class_Environment_property_glow_levels/4>` | ``0.1`` |
  110. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  111. | :ref:`float<class_float>` | :ref:`glow_levels/5<class_Environment_property_glow_levels/5>` | ``0.0`` |
  112. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  113. | :ref:`float<class_float>` | :ref:`glow_levels/6<class_Environment_property_glow_levels/6>` | ``0.0`` |
  114. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  115. | :ref:`float<class_float>` | :ref:`glow_levels/7<class_Environment_property_glow_levels/7>` | ``0.0`` |
  116. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  117. | :ref:`Texture<class_Texture>` | :ref:`glow_map<class_Environment_property_glow_map>` | |
  118. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  119. | :ref:`float<class_float>` | :ref:`glow_map_strength<class_Environment_property_glow_map_strength>` | ``0.8`` |
  120. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  121. | :ref:`float<class_float>` | :ref:`glow_mix<class_Environment_property_glow_mix>` | ``0.05`` |
  122. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  123. | :ref:`bool<class_bool>` | :ref:`glow_normalized<class_Environment_property_glow_normalized>` | ``false`` |
  124. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  125. | :ref:`float<class_float>` | :ref:`glow_strength<class_Environment_property_glow_strength>` | ``1.0`` |
  126. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  127. | :ref:`ReflectionSource<enum_Environment_ReflectionSource>` | :ref:`reflected_light_source<class_Environment_property_reflected_light_source>` | ``0`` |
  128. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  129. | :ref:`float<class_float>` | :ref:`sdfgi_bounce_feedback<class_Environment_property_sdfgi_bounce_feedback>` | ``0.5`` |
  130. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  131. | :ref:`float<class_float>` | :ref:`sdfgi_cascade0_distance<class_Environment_property_sdfgi_cascade0_distance>` | ``12.8`` |
  132. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  133. | :ref:`int<class_int>` | :ref:`sdfgi_cascades<class_Environment_property_sdfgi_cascades>` | ``4`` |
  134. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  135. | :ref:`bool<class_bool>` | :ref:`sdfgi_enabled<class_Environment_property_sdfgi_enabled>` | ``false`` |
  136. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  137. | :ref:`float<class_float>` | :ref:`sdfgi_energy<class_Environment_property_sdfgi_energy>` | ``1.0`` |
  138. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  139. | :ref:`float<class_float>` | :ref:`sdfgi_max_distance<class_Environment_property_sdfgi_max_distance>` | ``204.8`` |
  140. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  141. | :ref:`float<class_float>` | :ref:`sdfgi_min_cell_size<class_Environment_property_sdfgi_min_cell_size>` | ``0.2`` |
  142. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  143. | :ref:`float<class_float>` | :ref:`sdfgi_normal_bias<class_Environment_property_sdfgi_normal_bias>` | ``1.1`` |
  144. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  145. | :ref:`float<class_float>` | :ref:`sdfgi_probe_bias<class_Environment_property_sdfgi_probe_bias>` | ``1.1`` |
  146. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  147. | :ref:`bool<class_bool>` | :ref:`sdfgi_read_sky_light<class_Environment_property_sdfgi_read_sky_light>` | ``true`` |
  148. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  149. | :ref:`bool<class_bool>` | :ref:`sdfgi_use_occlusion<class_Environment_property_sdfgi_use_occlusion>` | ``false`` |
  150. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  151. | :ref:`SDFGIYScale<enum_Environment_SDFGIYScale>` | :ref:`sdfgi_y_scale<class_Environment_property_sdfgi_y_scale>` | ``1`` |
  152. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  153. | :ref:`Sky<class_Sky>` | :ref:`sky<class_Environment_property_sky>` | |
  154. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  155. | :ref:`float<class_float>` | :ref:`sky_custom_fov<class_Environment_property_sky_custom_fov>` | ``0.0`` |
  156. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  157. | :ref:`Vector3<class_Vector3>` | :ref:`sky_rotation<class_Environment_property_sky_rotation>` | ``Vector3(0, 0, 0)`` |
  158. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  159. | :ref:`float<class_float>` | :ref:`ssao_ao_channel_affect<class_Environment_property_ssao_ao_channel_affect>` | ``0.0`` |
  160. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  161. | :ref:`float<class_float>` | :ref:`ssao_detail<class_Environment_property_ssao_detail>` | ``0.5`` |
  162. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  163. | :ref:`bool<class_bool>` | :ref:`ssao_enabled<class_Environment_property_ssao_enabled>` | ``false`` |
  164. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  165. | :ref:`float<class_float>` | :ref:`ssao_horizon<class_Environment_property_ssao_horizon>` | ``0.06`` |
  166. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  167. | :ref:`float<class_float>` | :ref:`ssao_intensity<class_Environment_property_ssao_intensity>` | ``2.0`` |
  168. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  169. | :ref:`float<class_float>` | :ref:`ssao_light_affect<class_Environment_property_ssao_light_affect>` | ``0.0`` |
  170. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  171. | :ref:`float<class_float>` | :ref:`ssao_power<class_Environment_property_ssao_power>` | ``1.5`` |
  172. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  173. | :ref:`float<class_float>` | :ref:`ssao_radius<class_Environment_property_ssao_radius>` | ``1.0`` |
  174. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  175. | :ref:`float<class_float>` | :ref:`ssao_sharpness<class_Environment_property_ssao_sharpness>` | ``0.98`` |
  176. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  177. | :ref:`bool<class_bool>` | :ref:`ssil_enabled<class_Environment_property_ssil_enabled>` | ``false`` |
  178. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  179. | :ref:`float<class_float>` | :ref:`ssil_intensity<class_Environment_property_ssil_intensity>` | ``1.0`` |
  180. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  181. | :ref:`float<class_float>` | :ref:`ssil_normal_rejection<class_Environment_property_ssil_normal_rejection>` | ``1.0`` |
  182. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  183. | :ref:`float<class_float>` | :ref:`ssil_radius<class_Environment_property_ssil_radius>` | ``5.0`` |
  184. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  185. | :ref:`float<class_float>` | :ref:`ssil_sharpness<class_Environment_property_ssil_sharpness>` | ``0.98`` |
  186. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  187. | :ref:`float<class_float>` | :ref:`ssr_depth_tolerance<class_Environment_property_ssr_depth_tolerance>` | ``0.5`` |
  188. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  189. | :ref:`bool<class_bool>` | :ref:`ssr_enabled<class_Environment_property_ssr_enabled>` | ``false`` |
  190. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  191. | :ref:`float<class_float>` | :ref:`ssr_fade_in<class_Environment_property_ssr_fade_in>` | ``0.15`` |
  192. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  193. | :ref:`float<class_float>` | :ref:`ssr_fade_out<class_Environment_property_ssr_fade_out>` | ``2.0`` |
  194. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  195. | :ref:`int<class_int>` | :ref:`ssr_max_steps<class_Environment_property_ssr_max_steps>` | ``64`` |
  196. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  197. | :ref:`float<class_float>` | :ref:`tonemap_exposure<class_Environment_property_tonemap_exposure>` | ``1.0`` |
  198. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  199. | :ref:`ToneMapper<enum_Environment_ToneMapper>` | :ref:`tonemap_mode<class_Environment_property_tonemap_mode>` | ``0`` |
  200. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  201. | :ref:`float<class_float>` | :ref:`tonemap_white<class_Environment_property_tonemap_white>` | ``1.0`` |
  202. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  203. | :ref:`Color<class_Color>` | :ref:`volumetric_fog_albedo<class_Environment_property_volumetric_fog_albedo>` | ``Color(1, 1, 1, 1)`` |
  204. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  205. | :ref:`float<class_float>` | :ref:`volumetric_fog_ambient_inject<class_Environment_property_volumetric_fog_ambient_inject>` | ``0.0`` |
  206. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  207. | :ref:`float<class_float>` | :ref:`volumetric_fog_anisotropy<class_Environment_property_volumetric_fog_anisotropy>` | ``0.2`` |
  208. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  209. | :ref:`float<class_float>` | :ref:`volumetric_fog_density<class_Environment_property_volumetric_fog_density>` | ``0.05`` |
  210. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  211. | :ref:`float<class_float>` | :ref:`volumetric_fog_detail_spread<class_Environment_property_volumetric_fog_detail_spread>` | ``2.0`` |
  212. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  213. | :ref:`Color<class_Color>` | :ref:`volumetric_fog_emission<class_Environment_property_volumetric_fog_emission>` | ``Color(0, 0, 0, 1)`` |
  214. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  215. | :ref:`float<class_float>` | :ref:`volumetric_fog_emission_energy<class_Environment_property_volumetric_fog_emission_energy>` | ``1.0`` |
  216. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  217. | :ref:`bool<class_bool>` | :ref:`volumetric_fog_enabled<class_Environment_property_volumetric_fog_enabled>` | ``false`` |
  218. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  219. | :ref:`float<class_float>` | :ref:`volumetric_fog_gi_inject<class_Environment_property_volumetric_fog_gi_inject>` | ``1.0`` |
  220. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  221. | :ref:`float<class_float>` | :ref:`volumetric_fog_length<class_Environment_property_volumetric_fog_length>` | ``64.0`` |
  222. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  223. | :ref:`float<class_float>` | :ref:`volumetric_fog_sky_affect<class_Environment_property_volumetric_fog_sky_affect>` | ``1.0`` |
  224. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  225. | :ref:`float<class_float>` | :ref:`volumetric_fog_temporal_reprojection_amount<class_Environment_property_volumetric_fog_temporal_reprojection_amount>` | ``0.9`` |
  226. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  227. | :ref:`bool<class_bool>` | :ref:`volumetric_fog_temporal_reprojection_enabled<class_Environment_property_volumetric_fog_temporal_reprojection_enabled>` | ``true`` |
  228. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
  229. .. rst-class:: classref-reftable-group
  230. Methods
  231. -------
  232. .. table::
  233. :widths: auto
  234. +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
  235. | :ref:`float<class_float>` | :ref:`get_glow_level<class_Environment_method_get_glow_level>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| |
  236. +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
  237. | |void| | :ref:`set_glow_level<class_Environment_method_set_glow_level>`\ (\ idx\: :ref:`int<class_int>`, intensity\: :ref:`float<class_float>`\ ) |
  238. +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
  239. .. rst-class:: classref-section-separator
  240. ----
  241. .. rst-class:: classref-descriptions-group
  242. Enumerations
  243. ------------
  244. .. _enum_Environment_BGMode:
  245. .. rst-class:: classref-enumeration
  246. enum **BGMode**: :ref:`🔗<enum_Environment_BGMode>`
  247. .. _class_Environment_constant_BG_CLEAR_COLOR:
  248. .. rst-class:: classref-enumeration-constant
  249. :ref:`BGMode<enum_Environment_BGMode>` **BG_CLEAR_COLOR** = ``0``
  250. 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>`.
  251. .. _class_Environment_constant_BG_COLOR:
  252. .. rst-class:: classref-enumeration-constant
  253. :ref:`BGMode<enum_Environment_BGMode>` **BG_COLOR** = ``1``
  254. Clears the background using a custom clear color.
  255. .. _class_Environment_constant_BG_SKY:
  256. .. rst-class:: classref-enumeration-constant
  257. :ref:`BGMode<enum_Environment_BGMode>` **BG_SKY** = ``2``
  258. Displays a user-defined sky in the background.
  259. .. _class_Environment_constant_BG_CANVAS:
  260. .. rst-class:: classref-enumeration-constant
  261. :ref:`BGMode<enum_Environment_BGMode>` **BG_CANVAS** = ``3``
  262. Displays a :ref:`CanvasLayer<class_CanvasLayer>` in the background.
  263. .. _class_Environment_constant_BG_KEEP:
  264. .. rst-class:: classref-enumeration-constant
  265. :ref:`BGMode<enum_Environment_BGMode>` **BG_KEEP** = ``4``
  266. 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.
  267. .. _class_Environment_constant_BG_CAMERA_FEED:
  268. .. rst-class:: classref-enumeration-constant
  269. :ref:`BGMode<enum_Environment_BGMode>` **BG_CAMERA_FEED** = ``5``
  270. Displays a camera feed in the background.
  271. .. _class_Environment_constant_BG_MAX:
  272. .. rst-class:: classref-enumeration-constant
  273. :ref:`BGMode<enum_Environment_BGMode>` **BG_MAX** = ``6``
  274. Represents the size of the :ref:`BGMode<enum_Environment_BGMode>` enum.
  275. .. rst-class:: classref-item-separator
  276. ----
  277. .. _enum_Environment_AmbientSource:
  278. .. rst-class:: classref-enumeration
  279. enum **AmbientSource**: :ref:`🔗<enum_Environment_AmbientSource>`
  280. .. _class_Environment_constant_AMBIENT_SOURCE_BG:
  281. .. rst-class:: classref-enumeration-constant
  282. :ref:`AmbientSource<enum_Environment_AmbientSource>` **AMBIENT_SOURCE_BG** = ``0``
  283. Gather ambient light from whichever source is specified as the background.
  284. .. _class_Environment_constant_AMBIENT_SOURCE_DISABLED:
  285. .. rst-class:: classref-enumeration-constant
  286. :ref:`AmbientSource<enum_Environment_AmbientSource>` **AMBIENT_SOURCE_DISABLED** = ``1``
  287. Disable ambient light. This provides a slight performance boost over :ref:`AMBIENT_SOURCE_SKY<class_Environment_constant_AMBIENT_SOURCE_SKY>`.
  288. .. _class_Environment_constant_AMBIENT_SOURCE_COLOR:
  289. .. rst-class:: classref-enumeration-constant
  290. :ref:`AmbientSource<enum_Environment_AmbientSource>` **AMBIENT_SOURCE_COLOR** = ``2``
  291. 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>`.
  292. .. _class_Environment_constant_AMBIENT_SOURCE_SKY:
  293. .. rst-class:: classref-enumeration-constant
  294. :ref:`AmbientSource<enum_Environment_AmbientSource>` **AMBIENT_SOURCE_SKY** = ``3``
  295. Gather ambient light from the :ref:`Sky<class_Sky>` regardless of what the background is.
  296. .. rst-class:: classref-item-separator
  297. ----
  298. .. _enum_Environment_ReflectionSource:
  299. .. rst-class:: classref-enumeration
  300. enum **ReflectionSource**: :ref:`🔗<enum_Environment_ReflectionSource>`
  301. .. _class_Environment_constant_REFLECTION_SOURCE_BG:
  302. .. rst-class:: classref-enumeration-constant
  303. :ref:`ReflectionSource<enum_Environment_ReflectionSource>` **REFLECTION_SOURCE_BG** = ``0``
  304. Use the background for reflections.
  305. .. _class_Environment_constant_REFLECTION_SOURCE_DISABLED:
  306. .. rst-class:: classref-enumeration-constant
  307. :ref:`ReflectionSource<enum_Environment_ReflectionSource>` **REFLECTION_SOURCE_DISABLED** = ``1``
  308. Disable reflections. This provides a slight performance boost over other options.
  309. .. _class_Environment_constant_REFLECTION_SOURCE_SKY:
  310. .. rst-class:: classref-enumeration-constant
  311. :ref:`ReflectionSource<enum_Environment_ReflectionSource>` **REFLECTION_SOURCE_SKY** = ``2``
  312. Use the :ref:`Sky<class_Sky>` for reflections regardless of what the background is.
  313. .. rst-class:: classref-item-separator
  314. ----
  315. .. _enum_Environment_ToneMapper:
  316. .. rst-class:: classref-enumeration
  317. enum **ToneMapper**: :ref:`🔗<enum_Environment_ToneMapper>`
  318. .. _class_Environment_constant_TONE_MAPPER_LINEAR:
  319. .. rst-class:: classref-enumeration-constant
  320. :ref:`ToneMapper<enum_Environment_ToneMapper>` **TONE_MAPPER_LINEAR** = ``0``
  321. Does not modify color data, resulting in a linear tonemapping curve which unnaturally clips bright values, causing bright lighting to look blown out. The simplest and fastest tonemapper.
  322. .. _class_Environment_constant_TONE_MAPPER_REINHARDT:
  323. .. rst-class:: classref-enumeration-constant
  324. :ref:`ToneMapper<enum_Environment_ToneMapper>` **TONE_MAPPER_REINHARDT** = ``1``
  325. A simple tonemapping curve that rolls off bright values to prevent clipping. This results in an image that can appear dull and low contrast. Slower than :ref:`TONE_MAPPER_LINEAR<class_Environment_constant_TONE_MAPPER_LINEAR>`.
  326. \ **Note:** When :ref:`tonemap_white<class_Environment_property_tonemap_white>` is left at the default value of ``1.0``, :ref:`TONE_MAPPER_REINHARDT<class_Environment_constant_TONE_MAPPER_REINHARDT>` produces an identical image to :ref:`TONE_MAPPER_LINEAR<class_Environment_constant_TONE_MAPPER_LINEAR>`.
  327. .. _class_Environment_constant_TONE_MAPPER_FILMIC:
  328. .. rst-class:: classref-enumeration-constant
  329. :ref:`ToneMapper<enum_Environment_ToneMapper>` **TONE_MAPPER_FILMIC** = ``2``
  330. Uses a film-like tonemapping curve to prevent clipping of bright values and provide better contrast than :ref:`TONE_MAPPER_REINHARDT<class_Environment_constant_TONE_MAPPER_REINHARDT>`. Slightly slower than :ref:`TONE_MAPPER_REINHARDT<class_Environment_constant_TONE_MAPPER_REINHARDT>`.
  331. .. _class_Environment_constant_TONE_MAPPER_ACES:
  332. .. rst-class:: classref-enumeration-constant
  333. :ref:`ToneMapper<enum_Environment_ToneMapper>` **TONE_MAPPER_ACES** = ``3``
  334. Uses a high-contrast film-like tonemapping curve and desaturates bright values for a more realistic appearance. Slightly slower than :ref:`TONE_MAPPER_FILMIC<class_Environment_constant_TONE_MAPPER_FILMIC>`.
  335. \ **Note:** This tonemapping operator is called "ACES Fitted" in Godot 3.x.
  336. .. _class_Environment_constant_TONE_MAPPER_AGX:
  337. .. rst-class:: classref-enumeration-constant
  338. :ref:`ToneMapper<enum_Environment_ToneMapper>` **TONE_MAPPER_AGX** = ``4``
  339. Uses a film-like tonemapping curve and desaturates bright values for a more realistic appearance. Better than other tonemappers at maintaining the hue of colors as they become brighter. The slowest tonemapping option.
  340. \ **Note:** :ref:`tonemap_white<class_Environment_property_tonemap_white>` is fixed at a value of ``16.29``, which makes :ref:`TONE_MAPPER_AGX<class_Environment_constant_TONE_MAPPER_AGX>` unsuitable for use with the Mobile rendering method.
  341. .. rst-class:: classref-item-separator
  342. ----
  343. .. _enum_Environment_GlowBlendMode:
  344. .. rst-class:: classref-enumeration
  345. enum **GlowBlendMode**: :ref:`🔗<enum_Environment_GlowBlendMode>`
  346. .. _class_Environment_constant_GLOW_BLEND_MODE_ADDITIVE:
  347. .. rst-class:: classref-enumeration-constant
  348. :ref:`GlowBlendMode<enum_Environment_GlowBlendMode>` **GLOW_BLEND_MODE_ADDITIVE** = ``0``
  349. Adds the glow effect to the scene.
  350. .. _class_Environment_constant_GLOW_BLEND_MODE_SCREEN:
  351. .. rst-class:: classref-enumeration-constant
  352. :ref:`GlowBlendMode<enum_Environment_GlowBlendMode>` **GLOW_BLEND_MODE_SCREEN** = ``1``
  353. Adds the glow effect to the scene after modifying the glow influence based on the scene value; dark values will be highly influenced by glow and bright values will not be influenced by glow. This approach avoids bright values becoming overly bright from the glow effect. :ref:`tonemap_white<class_Environment_property_tonemap_white>` is used to determine the maximum scene value where the glow should have no influence. When :ref:`tonemap_mode<class_Environment_property_tonemap_mode>` is set to :ref:`TONE_MAPPER_LINEAR<class_Environment_constant_TONE_MAPPER_LINEAR>`, a value of ``1.0`` will be used as the maximum scene value.
  354. .. _class_Environment_constant_GLOW_BLEND_MODE_SOFTLIGHT:
  355. .. rst-class:: classref-enumeration-constant
  356. :ref:`GlowBlendMode<enum_Environment_GlowBlendMode>` **GLOW_BLEND_MODE_SOFTLIGHT** = ``2``
  357. Adds the glow effect to the tonemapped image after modifying the glow influence based on the image value; dark values and bright values will not be influenced by glow and mid-range values will be highly influenced by glow. This approach avoids bright values becoming overly bright from the glow effect. The glow will have the largest influence on image values of ``0.25`` and will have no influence when applied to image values greater than ``1.0``.
  358. .. _class_Environment_constant_GLOW_BLEND_MODE_REPLACE:
  359. .. rst-class:: classref-enumeration-constant
  360. :ref:`GlowBlendMode<enum_Environment_GlowBlendMode>` **GLOW_BLEND_MODE_REPLACE** = ``3``
  361. Replaces all pixels' color by the glow effect. This can be used to simulate a full-screen blur effect by tweaking the glow parameters to match the original image's brightness or to preview glow configuration in the editor.
  362. .. _class_Environment_constant_GLOW_BLEND_MODE_MIX:
  363. .. rst-class:: classref-enumeration-constant
  364. :ref:`GlowBlendMode<enum_Environment_GlowBlendMode>` **GLOW_BLEND_MODE_MIX** = ``4``
  365. Mixes the glow image with the scene image. Best used with :ref:`glow_bloom<class_Environment_property_glow_bloom>` to avoid darkening the scene.
  366. .. rst-class:: classref-item-separator
  367. ----
  368. .. _enum_Environment_FogMode:
  369. .. rst-class:: classref-enumeration
  370. enum **FogMode**: :ref:`🔗<enum_Environment_FogMode>`
  371. .. _class_Environment_constant_FOG_MODE_EXPONENTIAL:
  372. .. rst-class:: classref-enumeration-constant
  373. :ref:`FogMode<enum_Environment_FogMode>` **FOG_MODE_EXPONENTIAL** = ``0``
  374. Use a physically-based fog model defined primarily by fog density.
  375. .. _class_Environment_constant_FOG_MODE_DEPTH:
  376. .. rst-class:: classref-enumeration-constant
  377. :ref:`FogMode<enum_Environment_FogMode>` **FOG_MODE_DEPTH** = ``1``
  378. Use a simple fog model defined by start and end positions and a custom curve. While not physically accurate, this model can be useful when you need more artistic control.
  379. .. rst-class:: classref-item-separator
  380. ----
  381. .. _enum_Environment_SDFGIYScale:
  382. .. rst-class:: classref-enumeration
  383. enum **SDFGIYScale**: :ref:`🔗<enum_Environment_SDFGIYScale>`
  384. .. _class_Environment_constant_SDFGI_Y_SCALE_50_PERCENT:
  385. .. rst-class:: classref-enumeration-constant
  386. :ref:`SDFGIYScale<enum_Environment_SDFGIYScale>` **SDFGI_Y_SCALE_50_PERCENT** = ``0``
  387. 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.
  388. .. _class_Environment_constant_SDFGI_Y_SCALE_75_PERCENT:
  389. .. rst-class:: classref-enumeration-constant
  390. :ref:`SDFGIYScale<enum_Environment_SDFGIYScale>` **SDFGI_Y_SCALE_75_PERCENT** = ``1``
  391. Use 75% scale for SDFGI on the Y (vertical) axis. This is a balance between the 50% and 100% SDFGI Y scales.
  392. .. _class_Environment_constant_SDFGI_Y_SCALE_100_PERCENT:
  393. .. rst-class:: classref-enumeration-constant
  394. :ref:`SDFGIYScale<enum_Environment_SDFGIYScale>` **SDFGI_Y_SCALE_100_PERCENT** = ``2``
  395. 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.
  396. .. rst-class:: classref-section-separator
  397. ----
  398. .. rst-class:: classref-descriptions-group
  399. Property Descriptions
  400. ---------------------
  401. .. _class_Environment_property_adjustment_brightness:
  402. .. rst-class:: classref-property
  403. :ref:`float<class_float>` **adjustment_brightness** = ``1.0`` :ref:`🔗<class_Environment_property_adjustment_brightness>`
  404. .. rst-class:: classref-property-setget
  405. - |void| **set_adjustment_brightness**\ (\ value\: :ref:`float<class_float>`\ )
  406. - :ref:`float<class_float>` **get_adjustment_brightness**\ (\ )
  407. Applies a simple brightness adjustment to the rendered image after tonemaping. To adjust scene brightness use :ref:`tonemap_exposure<class_Environment_property_tonemap_exposure>` instead, which is applied before tonemapping and thus less prone to issues with bright colors. Effective only if :ref:`adjustment_enabled<class_Environment_property_adjustment_enabled>` is ``true``.
  408. .. rst-class:: classref-item-separator
  409. ----
  410. .. _class_Environment_property_adjustment_color_correction:
  411. .. rst-class:: classref-property
  412. :ref:`Texture<class_Texture>` **adjustment_color_correction** :ref:`🔗<class_Environment_property_adjustment_color_correction>`
  413. .. rst-class:: classref-property-setget
  414. - |void| **set_adjustment_color_correction**\ (\ value\: :ref:`Texture<class_Texture>`\ )
  415. - :ref:`Texture<class_Texture>` **get_adjustment_color_correction**\ (\ )
  416. 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 :ref:`adjustment_enabled<class_Environment_property_adjustment_enabled>` is ``true``.
  417. .. rst-class:: classref-item-separator
  418. ----
  419. .. _class_Environment_property_adjustment_contrast:
  420. .. rst-class:: classref-property
  421. :ref:`float<class_float>` **adjustment_contrast** = ``1.0`` :ref:`🔗<class_Environment_property_adjustment_contrast>`
  422. .. rst-class:: classref-property-setget
  423. - |void| **set_adjustment_contrast**\ (\ value\: :ref:`float<class_float>`\ )
  424. - :ref:`float<class_float>` **get_adjustment_contrast**\ (\ )
  425. Increasing :ref:`adjustment_contrast<class_Environment_property_adjustment_contrast>` will make dark values darker and bright values brighter. This simple adjustment is applied to the rendered image after tonemaping. When set to a value greater than ``1.0``, :ref:`adjustment_contrast<class_Environment_property_adjustment_contrast>` is prone to clipping colors that become too bright or too dark. Effective only if :ref:`adjustment_enabled<class_Environment_property_adjustment_enabled>` is ``true``.
  426. .. rst-class:: classref-item-separator
  427. ----
  428. .. _class_Environment_property_adjustment_enabled:
  429. .. rst-class:: classref-property
  430. :ref:`bool<class_bool>` **adjustment_enabled** = ``false`` :ref:`🔗<class_Environment_property_adjustment_enabled>`
  431. .. rst-class:: classref-property-setget
  432. - |void| **set_adjustment_enabled**\ (\ value\: :ref:`bool<class_bool>`\ )
  433. - :ref:`bool<class_bool>` **is_adjustment_enabled**\ (\ )
  434. 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.
  435. .. rst-class:: classref-item-separator
  436. ----
  437. .. _class_Environment_property_adjustment_saturation:
  438. .. rst-class:: classref-property
  439. :ref:`float<class_float>` **adjustment_saturation** = ``1.0`` :ref:`🔗<class_Environment_property_adjustment_saturation>`
  440. .. rst-class:: classref-property-setget
  441. - |void| **set_adjustment_saturation**\ (\ value\: :ref:`float<class_float>`\ )
  442. - :ref:`float<class_float>` **get_adjustment_saturation**\ (\ )
  443. Applies a simple saturation adjustment to the rendered image after tonemaping. When :ref:`adjustment_saturation<class_Environment_property_adjustment_saturation>` is set to ``0.0``, the rendered image will be fully converted to a grayscale image. Effective only if :ref:`adjustment_enabled<class_Environment_property_adjustment_enabled>` is ``true``.
  444. .. rst-class:: classref-item-separator
  445. ----
  446. .. _class_Environment_property_ambient_light_color:
  447. .. rst-class:: classref-property
  448. :ref:`Color<class_Color>` **ambient_light_color** = ``Color(0, 0, 0, 1)`` :ref:`🔗<class_Environment_property_ambient_light_color>`
  449. .. rst-class:: classref-property-setget
  450. - |void| **set_ambient_light_color**\ (\ value\: :ref:`Color<class_Color>`\ )
  451. - :ref:`Color<class_Color>` **get_ambient_light_color**\ (\ )
  452. 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).
  453. .. rst-class:: classref-item-separator
  454. ----
  455. .. _class_Environment_property_ambient_light_energy:
  456. .. rst-class:: classref-property
  457. :ref:`float<class_float>` **ambient_light_energy** = ``1.0`` :ref:`🔗<class_Environment_property_ambient_light_energy>`
  458. .. rst-class:: classref-property-setget
  459. - |void| **set_ambient_light_energy**\ (\ value\: :ref:`float<class_float>`\ )
  460. - :ref:`float<class_float>` **get_ambient_light_energy**\ (\ )
  461. 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).
  462. .. rst-class:: classref-item-separator
  463. ----
  464. .. _class_Environment_property_ambient_light_sky_contribution:
  465. .. rst-class:: classref-property
  466. :ref:`float<class_float>` **ambient_light_sky_contribution** = ``1.0`` :ref:`🔗<class_Environment_property_ambient_light_sky_contribution>`
  467. .. rst-class:: classref-property-setget
  468. - |void| **set_ambient_light_sky_contribution**\ (\ value\: :ref:`float<class_float>`\ )
  469. - :ref:`float<class_float>` **get_ambient_light_sky_contribution**\ (\ )
  470. 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.
  471. \ **Note:** :ref:`ambient_light_sky_contribution<class_Environment_property_ambient_light_sky_contribution>` is internally clamped between ``0.0`` and ``1.0`` (inclusive).
  472. .. rst-class:: classref-item-separator
  473. ----
  474. .. _class_Environment_property_ambient_light_source:
  475. .. rst-class:: classref-property
  476. :ref:`AmbientSource<enum_Environment_AmbientSource>` **ambient_light_source** = ``0`` :ref:`🔗<class_Environment_property_ambient_light_source>`
  477. .. rst-class:: classref-property-setget
  478. - |void| **set_ambient_source**\ (\ value\: :ref:`AmbientSource<enum_Environment_AmbientSource>`\ )
  479. - :ref:`AmbientSource<enum_Environment_AmbientSource>` **get_ambient_source**\ (\ )
  480. The ambient light source to use for rendering materials and global illumination.
  481. .. rst-class:: classref-item-separator
  482. ----
  483. .. _class_Environment_property_background_camera_feed_id:
  484. .. rst-class:: classref-property
  485. :ref:`int<class_int>` **background_camera_feed_id** = ``1`` :ref:`🔗<class_Environment_property_background_camera_feed_id>`
  486. .. rst-class:: classref-property-setget
  487. - |void| **set_camera_feed_id**\ (\ value\: :ref:`int<class_int>`\ )
  488. - :ref:`int<class_int>` **get_camera_feed_id**\ (\ )
  489. The ID of the camera feed to show in the background.
  490. .. rst-class:: classref-item-separator
  491. ----
  492. .. _class_Environment_property_background_canvas_max_layer:
  493. .. rst-class:: classref-property
  494. :ref:`int<class_int>` **background_canvas_max_layer** = ``0`` :ref:`🔗<class_Environment_property_background_canvas_max_layer>`
  495. .. rst-class:: classref-property-setget
  496. - |void| **set_canvas_max_layer**\ (\ value\: :ref:`int<class_int>`\ )
  497. - :ref:`int<class_int>` **get_canvas_max_layer**\ (\ )
  498. The maximum layer ID to display. Only effective when using the :ref:`BG_CANVAS<class_Environment_constant_BG_CANVAS>` background mode.
  499. .. rst-class:: classref-item-separator
  500. ----
  501. .. _class_Environment_property_background_color:
  502. .. rst-class:: classref-property
  503. :ref:`Color<class_Color>` **background_color** = ``Color(0, 0, 0, 1)`` :ref:`🔗<class_Environment_property_background_color>`
  504. .. rst-class:: classref-property-setget
  505. - |void| **set_bg_color**\ (\ value\: :ref:`Color<class_Color>`\ )
  506. - :ref:`Color<class_Color>` **get_bg_color**\ (\ )
  507. 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.
  508. .. rst-class:: classref-item-separator
  509. ----
  510. .. _class_Environment_property_background_energy_multiplier:
  511. .. rst-class:: classref-property
  512. :ref:`float<class_float>` **background_energy_multiplier** = ``1.0`` :ref:`🔗<class_Environment_property_background_energy_multiplier>`
  513. .. rst-class:: classref-property-setget
  514. - |void| **set_bg_energy_multiplier**\ (\ value\: :ref:`float<class_float>`\ )
  515. - :ref:`float<class_float>` **get_bg_energy_multiplier**\ (\ )
  516. Multiplier for background energy. Increase to make background brighter, decrease to make background dimmer.
  517. .. rst-class:: classref-item-separator
  518. ----
  519. .. _class_Environment_property_background_intensity:
  520. .. rst-class:: classref-property
  521. :ref:`float<class_float>` **background_intensity** = ``30000.0`` :ref:`🔗<class_Environment_property_background_intensity>`
  522. .. rst-class:: classref-property-setget
  523. - |void| **set_bg_intensity**\ (\ value\: :ref:`float<class_float>`\ )
  524. - :ref:`float<class_float>` **get_bg_intensity**\ (\ )
  525. 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.
  526. .. rst-class:: classref-item-separator
  527. ----
  528. .. _class_Environment_property_background_mode:
  529. .. rst-class:: classref-property
  530. :ref:`BGMode<enum_Environment_BGMode>` **background_mode** = ``0`` :ref:`🔗<class_Environment_property_background_mode>`
  531. .. rst-class:: classref-property-setget
  532. - |void| **set_background**\ (\ value\: :ref:`BGMode<enum_Environment_BGMode>`\ )
  533. - :ref:`BGMode<enum_Environment_BGMode>` **get_background**\ (\ )
  534. The background mode.
  535. .. rst-class:: classref-item-separator
  536. ----
  537. .. _class_Environment_property_fog_aerial_perspective:
  538. .. rst-class:: classref-property
  539. :ref:`float<class_float>` **fog_aerial_perspective** = ``0.0`` :ref:`🔗<class_Environment_property_fog_aerial_perspective>`
  540. .. rst-class:: classref-property-setget
  541. - |void| **set_fog_aerial_perspective**\ (\ value\: :ref:`float<class_float>`\ )
  542. - :ref:`float<class_float>` **get_fog_aerial_perspective**\ (\ )
  543. If set above ``0.0`` (exclusive), blends between the fog's color and the color of the background :ref:`Sky<class_Sky>`, as read from the radiance cubemap. 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>`.
  544. 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.
  545. Notice that this does not sample the :ref:`Sky<class_Sky>` directly, but rather the radiance cubemap. The cubemap is sampled at a mipmap level depending on the depth of the rendered pixel; the farther away, the higher the resolution of the sampled mipmap. This results in the actual color being a blurred version of the sky, with more blur closer to the camera. The highest mipmap resolution is used at a depth of :ref:`Camera3D.far<class_Camera3D_property_far>`.
  546. .. rst-class:: classref-item-separator
  547. ----
  548. .. _class_Environment_property_fog_density:
  549. .. rst-class:: classref-property
  550. :ref:`float<class_float>` **fog_density** = ``0.01`` :ref:`🔗<class_Environment_property_fog_density>`
  551. .. rst-class:: classref-property-setget
  552. - |void| **set_fog_density**\ (\ value\: :ref:`float<class_float>`\ )
  553. - :ref:`float<class_float>` **get_fog_density**\ (\ )
  554. The fog density to be used. This is demonstrated in different ways depending on the :ref:`fog_mode<class_Environment_property_fog_mode>` mode chosen:
  555. \ **Exponential Fog Mode:** Higher values result in denser fog. The fog rendering is exponential like in real life.
  556. \ **Depth Fog mode:** The maximum intensity of the deep fog, effect will appear in the distance (relative to the camera). At ``1.0`` the fog will fully obscure the scene, at ``0.0`` the fog will not be visible.
  557. .. rst-class:: classref-item-separator
  558. ----
  559. .. _class_Environment_property_fog_depth_begin:
  560. .. rst-class:: classref-property
  561. :ref:`float<class_float>` **fog_depth_begin** = ``10.0`` :ref:`🔗<class_Environment_property_fog_depth_begin>`
  562. .. rst-class:: classref-property-setget
  563. - |void| **set_fog_depth_begin**\ (\ value\: :ref:`float<class_float>`\ )
  564. - :ref:`float<class_float>` **get_fog_depth_begin**\ (\ )
  565. The fog's depth starting distance from the camera. Only available when :ref:`fog_mode<class_Environment_property_fog_mode>` is set to :ref:`FOG_MODE_DEPTH<class_Environment_constant_FOG_MODE_DEPTH>`.
  566. .. rst-class:: classref-item-separator
  567. ----
  568. .. _class_Environment_property_fog_depth_curve:
  569. .. rst-class:: classref-property
  570. :ref:`float<class_float>` **fog_depth_curve** = ``1.0`` :ref:`🔗<class_Environment_property_fog_depth_curve>`
  571. .. rst-class:: classref-property-setget
  572. - |void| **set_fog_depth_curve**\ (\ value\: :ref:`float<class_float>`\ )
  573. - :ref:`float<class_float>` **get_fog_depth_curve**\ (\ )
  574. The fog depth's intensity curve. A number of presets are available in the Inspector by right-clicking the curve. Only available when :ref:`fog_mode<class_Environment_property_fog_mode>` is set to :ref:`FOG_MODE_DEPTH<class_Environment_constant_FOG_MODE_DEPTH>`.
  575. .. rst-class:: classref-item-separator
  576. ----
  577. .. _class_Environment_property_fog_depth_end:
  578. .. rst-class:: classref-property
  579. :ref:`float<class_float>` **fog_depth_end** = ``100.0`` :ref:`🔗<class_Environment_property_fog_depth_end>`
  580. .. rst-class:: classref-property-setget
  581. - |void| **set_fog_depth_end**\ (\ value\: :ref:`float<class_float>`\ )
  582. - :ref:`float<class_float>` **get_fog_depth_end**\ (\ )
  583. The fog's depth end distance from the camera. If this value is set to ``0``, it will be equal to the current camera's :ref:`Camera3D.far<class_Camera3D_property_far>` value. Only available when :ref:`fog_mode<class_Environment_property_fog_mode>` is set to :ref:`FOG_MODE_DEPTH<class_Environment_constant_FOG_MODE_DEPTH>`.
  584. .. rst-class:: classref-item-separator
  585. ----
  586. .. _class_Environment_property_fog_enabled:
  587. .. rst-class:: classref-property
  588. :ref:`bool<class_bool>` **fog_enabled** = ``false`` :ref:`🔗<class_Environment_property_fog_enabled>`
  589. .. rst-class:: classref-property-setget
  590. - |void| **set_fog_enabled**\ (\ value\: :ref:`bool<class_bool>`\ )
  591. - :ref:`bool<class_bool>` **is_fog_enabled**\ (\ )
  592. If ``true``, fog effects are enabled.
  593. .. rst-class:: classref-item-separator
  594. ----
  595. .. _class_Environment_property_fog_height:
  596. .. rst-class:: classref-property
  597. :ref:`float<class_float>` **fog_height** = ``0.0`` :ref:`🔗<class_Environment_property_fog_height>`
  598. .. rst-class:: classref-property-setget
  599. - |void| **set_fog_height**\ (\ value\: :ref:`float<class_float>`\ )
  600. - :ref:`float<class_float>` **get_fog_height**\ (\ )
  601. The height at which the height fog effect begins.
  602. .. rst-class:: classref-item-separator
  603. ----
  604. .. _class_Environment_property_fog_height_density:
  605. .. rst-class:: classref-property
  606. :ref:`float<class_float>` **fog_height_density** = ``0.0`` :ref:`🔗<class_Environment_property_fog_height_density>`
  607. .. rst-class:: classref-property-setget
  608. - |void| **set_fog_height_density**\ (\ value\: :ref:`float<class_float>`\ )
  609. - :ref:`float<class_float>` **get_fog_height_density**\ (\ )
  610. The density used to increase fog as height decreases. To make fog increase as height increases, use a negative value.
  611. .. rst-class:: classref-item-separator
  612. ----
  613. .. _class_Environment_property_fog_light_color:
  614. .. rst-class:: classref-property
  615. :ref:`Color<class_Color>` **fog_light_color** = ``Color(0.518, 0.553, 0.608, 1)`` :ref:`🔗<class_Environment_property_fog_light_color>`
  616. .. rst-class:: classref-property-setget
  617. - |void| **set_fog_light_color**\ (\ value\: :ref:`Color<class_Color>`\ )
  618. - :ref:`Color<class_Color>` **get_fog_light_color**\ (\ )
  619. The fog's color.
  620. .. rst-class:: classref-item-separator
  621. ----
  622. .. _class_Environment_property_fog_light_energy:
  623. .. rst-class:: classref-property
  624. :ref:`float<class_float>` **fog_light_energy** = ``1.0`` :ref:`🔗<class_Environment_property_fog_light_energy>`
  625. .. rst-class:: classref-property-setget
  626. - |void| **set_fog_light_energy**\ (\ value\: :ref:`float<class_float>`\ )
  627. - :ref:`float<class_float>` **get_fog_light_energy**\ (\ )
  628. The fog's brightness. Higher values result in brighter fog.
  629. .. rst-class:: classref-item-separator
  630. ----
  631. .. _class_Environment_property_fog_mode:
  632. .. rst-class:: classref-property
  633. :ref:`FogMode<enum_Environment_FogMode>` **fog_mode** = ``0`` :ref:`🔗<class_Environment_property_fog_mode>`
  634. .. rst-class:: classref-property-setget
  635. - |void| **set_fog_mode**\ (\ value\: :ref:`FogMode<enum_Environment_FogMode>`\ )
  636. - :ref:`FogMode<enum_Environment_FogMode>` **get_fog_mode**\ (\ )
  637. The fog mode.
  638. .. rst-class:: classref-item-separator
  639. ----
  640. .. _class_Environment_property_fog_sky_affect:
  641. .. rst-class:: classref-property
  642. :ref:`float<class_float>` **fog_sky_affect** = ``1.0`` :ref:`🔗<class_Environment_property_fog_sky_affect>`
  643. .. rst-class:: classref-property-setget
  644. - |void| **set_fog_sky_affect**\ (\ value\: :ref:`float<class_float>`\ )
  645. - :ref:`float<class_float>` **get_fog_sky_affect**\ (\ )
  646. 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.
  647. \ **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``.
  648. .. rst-class:: classref-item-separator
  649. ----
  650. .. _class_Environment_property_fog_sun_scatter:
  651. .. rst-class:: classref-property
  652. :ref:`float<class_float>` **fog_sun_scatter** = ``0.0`` :ref:`🔗<class_Environment_property_fog_sun_scatter>`
  653. .. rst-class:: classref-property-setget
  654. - |void| **set_fog_sun_scatter**\ (\ value\: :ref:`float<class_float>`\ )
  655. - :ref:`float<class_float>` **get_fog_sun_scatter**\ (\ )
  656. 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.
  657. .. rst-class:: classref-item-separator
  658. ----
  659. .. _class_Environment_property_glow_blend_mode:
  660. .. rst-class:: classref-property
  661. :ref:`GlowBlendMode<enum_Environment_GlowBlendMode>` **glow_blend_mode** = ``1`` :ref:`🔗<class_Environment_property_glow_blend_mode>`
  662. .. rst-class:: classref-property-setget
  663. - |void| **set_glow_blend_mode**\ (\ value\: :ref:`GlowBlendMode<enum_Environment_GlowBlendMode>`\ )
  664. - :ref:`GlowBlendMode<enum_Environment_GlowBlendMode>` **get_glow_blend_mode**\ (\ )
  665. The glow blending mode.
  666. \ **Note:** The Compatibility renderer always uses :ref:`GLOW_BLEND_MODE_SCREEN<class_Environment_constant_GLOW_BLEND_MODE_SCREEN>` and :ref:`glow_blend_mode<class_Environment_property_glow_blend_mode>` will have no effect.
  667. .. rst-class:: classref-item-separator
  668. ----
  669. .. _class_Environment_property_glow_bloom:
  670. .. rst-class:: classref-property
  671. :ref:`float<class_float>` **glow_bloom** = ``0.0`` :ref:`🔗<class_Environment_property_glow_bloom>`
  672. .. rst-class:: classref-property-setget
  673. - |void| **set_glow_bloom**\ (\ value\: :ref:`float<class_float>`\ )
  674. - :ref:`float<class_float>` **get_glow_bloom**\ (\ )
  675. 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>`.
  676. .. rst-class:: classref-item-separator
  677. ----
  678. .. _class_Environment_property_glow_enabled:
  679. .. rst-class:: classref-property
  680. :ref:`bool<class_bool>` **glow_enabled** = ``false`` :ref:`🔗<class_Environment_property_glow_enabled>`
  681. .. rst-class:: classref-property-setget
  682. - |void| **set_glow_enabled**\ (\ value\: :ref:`bool<class_bool>`\ )
  683. - :ref:`bool<class_bool>` **is_glow_enabled**\ (\ )
  684. If ``true``, the glow effect is enabled. This simulates real world atmosphere and eye/camera behavior by causing bright pixels to bleed onto surrounding pixels.
  685. \ **Note:** When using the Mobile rendering method, glow looks different due to the lower dynamic range available in the Mobile rendering method.
  686. \ **Note:** When using the Compatibility rendering method, glow uses a different implementation with some properties being unavailable and hidden from the inspector: ``glow_levels/*``, :ref:`glow_normalized<class_Environment_property_glow_normalized>`, :ref:`glow_strength<class_Environment_property_glow_strength>`, :ref:`glow_blend_mode<class_Environment_property_glow_blend_mode>`, :ref:`glow_mix<class_Environment_property_glow_mix>`, :ref:`glow_map<class_Environment_property_glow_map>`, and :ref:`glow_map_strength<class_Environment_property_glow_map_strength>`. This implementation is optimized to run on low-end devices and is less flexible as a result.
  687. .. rst-class:: classref-item-separator
  688. ----
  689. .. _class_Environment_property_glow_hdr_luminance_cap:
  690. .. rst-class:: classref-property
  691. :ref:`float<class_float>` **glow_hdr_luminance_cap** = ``12.0`` :ref:`🔗<class_Environment_property_glow_hdr_luminance_cap>`
  692. .. rst-class:: classref-property-setget
  693. - |void| **set_glow_hdr_luminance_cap**\ (\ value\: :ref:`float<class_float>`\ )
  694. - :ref:`float<class_float>` **get_glow_hdr_luminance_cap**\ (\ )
  695. The higher threshold of the HDR glow. Areas brighter than this threshold will be clamped for the purposes of the glow effect.
  696. .. rst-class:: classref-item-separator
  697. ----
  698. .. _class_Environment_property_glow_hdr_scale:
  699. .. rst-class:: classref-property
  700. :ref:`float<class_float>` **glow_hdr_scale** = ``2.0`` :ref:`🔗<class_Environment_property_glow_hdr_scale>`
  701. .. rst-class:: classref-property-setget
  702. - |void| **set_glow_hdr_bleed_scale**\ (\ value\: :ref:`float<class_float>`\ )
  703. - :ref:`float<class_float>` **get_glow_hdr_bleed_scale**\ (\ )
  704. The bleed scale of the HDR glow.
  705. .. rst-class:: classref-item-separator
  706. ----
  707. .. _class_Environment_property_glow_hdr_threshold:
  708. .. rst-class:: classref-property
  709. :ref:`float<class_float>` **glow_hdr_threshold** = ``1.0`` :ref:`🔗<class_Environment_property_glow_hdr_threshold>`
  710. .. rst-class:: classref-property-setget
  711. - |void| **set_glow_hdr_bleed_threshold**\ (\ value\: :ref:`float<class_float>`\ )
  712. - :ref:`float<class_float>` **get_glow_hdr_bleed_threshold**\ (\ )
  713. The lower threshold of the HDR glow. When using the Mobile rendering method (which only supports a lower dynamic range up to ``2.0``), this may need to be below ``1.0`` for glow to be visible. A value of ``0.9`` works well in this case. This value also needs to be decreased below ``1.0`` when using glow in 2D, as 2D rendering is performed in SDR.
  714. .. rst-class:: classref-item-separator
  715. ----
  716. .. _class_Environment_property_glow_intensity:
  717. .. rst-class:: classref-property
  718. :ref:`float<class_float>` **glow_intensity** = ``0.3`` :ref:`🔗<class_Environment_property_glow_intensity>`
  719. .. rst-class:: classref-property-setget
  720. - |void| **set_glow_intensity**\ (\ value\: :ref:`float<class_float>`\ )
  721. - :ref:`float<class_float>` **get_glow_intensity**\ (\ )
  722. The overall brightness multiplier of the glow effect. When using the Mobile rendering method (which only supports a lower dynamic range up to ``2.0``), this should be increased to ``1.5`` to compensate.
  723. .. rst-class:: classref-item-separator
  724. ----
  725. .. _class_Environment_property_glow_levels/1:
  726. .. rst-class:: classref-property
  727. :ref:`float<class_float>` **glow_levels/1** = ``1.0`` :ref:`🔗<class_Environment_property_glow_levels/1>`
  728. .. rst-class:: classref-property-setget
  729. - |void| **set_glow_level**\ (\ idx\: :ref:`int<class_int>`, intensity\: :ref:`float<class_float>`\ )
  730. - :ref:`float<class_float>` **get_glow_level**\ (\ idx\: :ref:`int<class_int>`\ ) |const|
  731. The intensity of the 1st level of glow. This is the most "local" level (least blurry).
  732. \ **Note:** :ref:`glow_levels/1<class_Environment_property_glow_levels/1>` has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices.
  733. .. rst-class:: classref-item-separator
  734. ----
  735. .. _class_Environment_property_glow_levels/2:
  736. .. rst-class:: classref-property
  737. :ref:`float<class_float>` **glow_levels/2** = ``0.8`` :ref:`🔗<class_Environment_property_glow_levels/2>`
  738. .. rst-class:: classref-property-setget
  739. - |void| **set_glow_level**\ (\ idx\: :ref:`int<class_int>`, intensity\: :ref:`float<class_float>`\ )
  740. - :ref:`float<class_float>` **get_glow_level**\ (\ idx\: :ref:`int<class_int>`\ ) |const|
  741. The intensity of the 2nd level of glow.
  742. \ **Note:** :ref:`glow_levels/2<class_Environment_property_glow_levels/2>` has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices.
  743. .. rst-class:: classref-item-separator
  744. ----
  745. .. _class_Environment_property_glow_levels/3:
  746. .. rst-class:: classref-property
  747. :ref:`float<class_float>` **glow_levels/3** = ``0.4`` :ref:`🔗<class_Environment_property_glow_levels/3>`
  748. .. rst-class:: classref-property-setget
  749. - |void| **set_glow_level**\ (\ idx\: :ref:`int<class_int>`, intensity\: :ref:`float<class_float>`\ )
  750. - :ref:`float<class_float>` **get_glow_level**\ (\ idx\: :ref:`int<class_int>`\ ) |const|
  751. The intensity of the 3rd level of glow.
  752. \ **Note:** :ref:`glow_levels/3<class_Environment_property_glow_levels/3>` has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices.
  753. .. rst-class:: classref-item-separator
  754. ----
  755. .. _class_Environment_property_glow_levels/4:
  756. .. rst-class:: classref-property
  757. :ref:`float<class_float>` **glow_levels/4** = ``0.1`` :ref:`🔗<class_Environment_property_glow_levels/4>`
  758. .. rst-class:: classref-property-setget
  759. - |void| **set_glow_level**\ (\ idx\: :ref:`int<class_int>`, intensity\: :ref:`float<class_float>`\ )
  760. - :ref:`float<class_float>` **get_glow_level**\ (\ idx\: :ref:`int<class_int>`\ ) |const|
  761. The intensity of the 4th level of glow.
  762. \ **Note:** :ref:`glow_levels/4<class_Environment_property_glow_levels/4>` has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices.
  763. .. rst-class:: classref-item-separator
  764. ----
  765. .. _class_Environment_property_glow_levels/5:
  766. .. rst-class:: classref-property
  767. :ref:`float<class_float>` **glow_levels/5** = ``0.0`` :ref:`🔗<class_Environment_property_glow_levels/5>`
  768. .. rst-class:: classref-property-setget
  769. - |void| **set_glow_level**\ (\ idx\: :ref:`int<class_int>`, intensity\: :ref:`float<class_float>`\ )
  770. - :ref:`float<class_float>` **get_glow_level**\ (\ idx\: :ref:`int<class_int>`\ ) |const|
  771. The intensity of the 5th level of glow.
  772. \ **Note:** :ref:`glow_levels/5<class_Environment_property_glow_levels/5>` has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices.
  773. .. rst-class:: classref-item-separator
  774. ----
  775. .. _class_Environment_property_glow_levels/6:
  776. .. rst-class:: classref-property
  777. :ref:`float<class_float>` **glow_levels/6** = ``0.0`` :ref:`🔗<class_Environment_property_glow_levels/6>`
  778. .. rst-class:: classref-property-setget
  779. - |void| **set_glow_level**\ (\ idx\: :ref:`int<class_int>`, intensity\: :ref:`float<class_float>`\ )
  780. - :ref:`float<class_float>` **get_glow_level**\ (\ idx\: :ref:`int<class_int>`\ ) |const|
  781. The intensity of the 6th level of glow.
  782. \ **Note:** :ref:`glow_levels/6<class_Environment_property_glow_levels/6>` has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices.
  783. .. rst-class:: classref-item-separator
  784. ----
  785. .. _class_Environment_property_glow_levels/7:
  786. .. rst-class:: classref-property
  787. :ref:`float<class_float>` **glow_levels/7** = ``0.0`` :ref:`🔗<class_Environment_property_glow_levels/7>`
  788. .. rst-class:: classref-property-setget
  789. - |void| **set_glow_level**\ (\ idx\: :ref:`int<class_int>`, intensity\: :ref:`float<class_float>`\ )
  790. - :ref:`float<class_float>` **get_glow_level**\ (\ idx\: :ref:`int<class_int>`\ ) |const|
  791. The intensity of the 7th level of glow. This is the most "global" level (blurriest).
  792. \ **Note:** :ref:`glow_levels/7<class_Environment_property_glow_levels/7>` has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices.
  793. .. rst-class:: classref-item-separator
  794. ----
  795. .. _class_Environment_property_glow_map:
  796. .. rst-class:: classref-property
  797. :ref:`Texture<class_Texture>` **glow_map** :ref:`🔗<class_Environment_property_glow_map>`
  798. .. rst-class:: classref-property-setget
  799. - |void| **set_glow_map**\ (\ value\: :ref:`Texture<class_Texture>`\ )
  800. - :ref:`Texture<class_Texture>` **get_glow_map**\ (\ )
  801. 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.
  802. \ **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).
  803. \ **Note:** :ref:`glow_map<class_Environment_property_glow_map>` has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices.
  804. .. rst-class:: classref-item-separator
  805. ----
  806. .. _class_Environment_property_glow_map_strength:
  807. .. rst-class:: classref-property
  808. :ref:`float<class_float>` **glow_map_strength** = ``0.8`` :ref:`🔗<class_Environment_property_glow_map_strength>`
  809. .. rst-class:: classref-property-setget
  810. - |void| **set_glow_map_strength**\ (\ value\: :ref:`float<class_float>`\ )
  811. - :ref:`float<class_float>` **get_glow_map_strength**\ (\ )
  812. How strong of an influence 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 influence, while a strength of ``1.0`` means the glow map has full influence.
  813. \ **Note:** If the glow map has black areas, a value of ``1.0`` can also turn off the glow effect entirely in specific areas of the screen.
  814. \ **Note:** :ref:`glow_map_strength<class_Environment_property_glow_map_strength>` has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices.
  815. .. rst-class:: classref-item-separator
  816. ----
  817. .. _class_Environment_property_glow_mix:
  818. .. rst-class:: classref-property
  819. :ref:`float<class_float>` **glow_mix** = ``0.05`` :ref:`🔗<class_Environment_property_glow_mix>`
  820. .. rst-class:: classref-property-setget
  821. - |void| **set_glow_mix**\ (\ value\: :ref:`float<class_float>`\ )
  822. - :ref:`float<class_float>` **get_glow_mix**\ (\ )
  823. 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>`.
  824. \ **Note:** :ref:`glow_mix<class_Environment_property_glow_mix>` has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices.
  825. .. rst-class:: classref-item-separator
  826. ----
  827. .. _class_Environment_property_glow_normalized:
  828. .. rst-class:: classref-property
  829. :ref:`bool<class_bool>` **glow_normalized** = ``false`` :ref:`🔗<class_Environment_property_glow_normalized>`
  830. .. rst-class:: classref-property-setget
  831. - |void| **set_glow_normalized**\ (\ value\: :ref:`bool<class_bool>`\ )
  832. - :ref:`bool<class_bool>` **is_glow_normalized**\ (\ )
  833. If ``true``, glow levels will be normalized so that summed together their intensities equal ``1.0``.
  834. \ **Note:** :ref:`glow_normalized<class_Environment_property_glow_normalized>` has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices.
  835. .. rst-class:: classref-item-separator
  836. ----
  837. .. _class_Environment_property_glow_strength:
  838. .. rst-class:: classref-property
  839. :ref:`float<class_float>` **glow_strength** = ``1.0`` :ref:`🔗<class_Environment_property_glow_strength>`
  840. .. rst-class:: classref-property-setget
  841. - |void| **set_glow_strength**\ (\ value\: :ref:`float<class_float>`\ )
  842. - :ref:`float<class_float>` **get_glow_strength**\ (\ )
  843. 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 Mobile rendering method, this should be increased to compensate for the lower dynamic range.
  844. \ **Note:** :ref:`glow_strength<class_Environment_property_glow_strength>` has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices.
  845. .. rst-class:: classref-item-separator
  846. ----
  847. .. _class_Environment_property_reflected_light_source:
  848. .. rst-class:: classref-property
  849. :ref:`ReflectionSource<enum_Environment_ReflectionSource>` **reflected_light_source** = ``0`` :ref:`🔗<class_Environment_property_reflected_light_source>`
  850. .. rst-class:: classref-property-setget
  851. - |void| **set_reflection_source**\ (\ value\: :ref:`ReflectionSource<enum_Environment_ReflectionSource>`\ )
  852. - :ref:`ReflectionSource<enum_Environment_ReflectionSource>` **get_reflection_source**\ (\ )
  853. The reflected (specular) light source.
  854. .. rst-class:: classref-item-separator
  855. ----
  856. .. _class_Environment_property_sdfgi_bounce_feedback:
  857. .. rst-class:: classref-property
  858. :ref:`float<class_float>` **sdfgi_bounce_feedback** = ``0.5`` :ref:`🔗<class_Environment_property_sdfgi_bounce_feedback>`
  859. .. rst-class:: classref-property-setget
  860. - |void| **set_sdfgi_bounce_feedback**\ (\ value\: :ref:`float<class_float>`\ )
  861. - :ref:`float<class_float>` **get_sdfgi_bounce_feedback**\ (\ )
  862. 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>`.
  863. \ **Note:** Values greater than ``0.5`` can cause infinite feedback loops and should be avoided in scenes with bright materials.
  864. \ **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.
  865. .. rst-class:: classref-item-separator
  866. ----
  867. .. _class_Environment_property_sdfgi_cascade0_distance:
  868. .. rst-class:: classref-property
  869. :ref:`float<class_float>` **sdfgi_cascade0_distance** = ``12.8`` :ref:`🔗<class_Environment_property_sdfgi_cascade0_distance>`
  870. .. rst-class:: classref-property-setget
  871. - |void| **set_sdfgi_cascade0_distance**\ (\ value\: :ref:`float<class_float>`\ )
  872. - :ref:`float<class_float>` **get_sdfgi_cascade0_distance**\ (\ )
  873. **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.
  874. .. rst-class:: classref-item-separator
  875. ----
  876. .. _class_Environment_property_sdfgi_cascades:
  877. .. rst-class:: classref-property
  878. :ref:`int<class_int>` **sdfgi_cascades** = ``4`` :ref:`🔗<class_Environment_property_sdfgi_cascades>`
  879. .. rst-class:: classref-property-setget
  880. - |void| **set_sdfgi_cascades**\ (\ value\: :ref:`int<class_int>`\ )
  881. - :ref:`int<class_int>` **get_sdfgi_cascades**\ (\ )
  882. 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.
  883. .. rst-class:: classref-item-separator
  884. ----
  885. .. _class_Environment_property_sdfgi_enabled:
  886. .. rst-class:: classref-property
  887. :ref:`bool<class_bool>` **sdfgi_enabled** = ``false`` :ref:`🔗<class_Environment_property_sdfgi_enabled>`
  888. .. rst-class:: classref-property-setget
  889. - |void| **set_sdfgi_enabled**\ (\ value\: :ref:`bool<class_bool>`\ )
  890. - :ref:`bool<class_bool>` **is_sdfgi_enabled**\ (\ )
  891. 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.
  892. \ **Note:** SDFGI is only supported in the Forward+ rendering method, not Mobile or Compatibility.
  893. \ **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.
  894. \ **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.
  895. .. rst-class:: classref-item-separator
  896. ----
  897. .. _class_Environment_property_sdfgi_energy:
  898. .. rst-class:: classref-property
  899. :ref:`float<class_float>` **sdfgi_energy** = ``1.0`` :ref:`🔗<class_Environment_property_sdfgi_energy>`
  900. .. rst-class:: classref-property-setget
  901. - |void| **set_sdfgi_energy**\ (\ value\: :ref:`float<class_float>`\ )
  902. - :ref:`float<class_float>` **get_sdfgi_energy**\ (\ )
  903. 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>`.
  904. .. rst-class:: classref-item-separator
  905. ----
  906. .. _class_Environment_property_sdfgi_max_distance:
  907. .. rst-class:: classref-property
  908. :ref:`float<class_float>` **sdfgi_max_distance** = ``204.8`` :ref:`🔗<class_Environment_property_sdfgi_max_distance>`
  909. .. rst-class:: classref-property-setget
  910. - |void| **set_sdfgi_max_distance**\ (\ value\: :ref:`float<class_float>`\ )
  911. - :ref:`float<class_float>` **get_sdfgi_max_distance**\ (\ )
  912. 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.
  913. \ **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.
  914. .. rst-class:: classref-item-separator
  915. ----
  916. .. _class_Environment_property_sdfgi_min_cell_size:
  917. .. rst-class:: classref-property
  918. :ref:`float<class_float>` **sdfgi_min_cell_size** = ``0.2`` :ref:`🔗<class_Environment_property_sdfgi_min_cell_size>`
  919. .. rst-class:: classref-property-setget
  920. - |void| **set_sdfgi_min_cell_size**\ (\ value\: :ref:`float<class_float>`\ )
  921. - :ref:`float<class_float>` **get_sdfgi_min_cell_size**\ (\ )
  922. 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.
  923. \ **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.
  924. .. rst-class:: classref-item-separator
  925. ----
  926. .. _class_Environment_property_sdfgi_normal_bias:
  927. .. rst-class:: classref-property
  928. :ref:`float<class_float>` **sdfgi_normal_bias** = ``1.1`` :ref:`🔗<class_Environment_property_sdfgi_normal_bias>`
  929. .. rst-class:: classref-property-setget
  930. - |void| **set_sdfgi_normal_bias**\ (\ value\: :ref:`float<class_float>`\ )
  931. - :ref:`float<class_float>` **get_sdfgi_normal_bias**\ (\ )
  932. 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.
  933. .. rst-class:: classref-item-separator
  934. ----
  935. .. _class_Environment_property_sdfgi_probe_bias:
  936. .. rst-class:: classref-property
  937. :ref:`float<class_float>` **sdfgi_probe_bias** = ``1.1`` :ref:`🔗<class_Environment_property_sdfgi_probe_bias>`
  938. .. rst-class:: classref-property-setget
  939. - |void| **set_sdfgi_probe_bias**\ (\ value\: :ref:`float<class_float>`\ )
  940. - :ref:`float<class_float>` **get_sdfgi_probe_bias**\ (\ )
  941. 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.
  942. .. rst-class:: classref-item-separator
  943. ----
  944. .. _class_Environment_property_sdfgi_read_sky_light:
  945. .. rst-class:: classref-property
  946. :ref:`bool<class_bool>` **sdfgi_read_sky_light** = ``true`` :ref:`🔗<class_Environment_property_sdfgi_read_sky_light>`
  947. .. rst-class:: classref-property-setget
  948. - |void| **set_sdfgi_read_sky_light**\ (\ value\: :ref:`bool<class_bool>`\ )
  949. - :ref:`bool<class_bool>` **is_sdfgi_reading_sky_light**\ (\ )
  950. If ``true``, SDFGI takes the environment lighting into account. This should be set to ``false`` for interior scenes.
  951. .. rst-class:: classref-item-separator
  952. ----
  953. .. _class_Environment_property_sdfgi_use_occlusion:
  954. .. rst-class:: classref-property
  955. :ref:`bool<class_bool>` **sdfgi_use_occlusion** = ``false`` :ref:`🔗<class_Environment_property_sdfgi_use_occlusion>`
  956. .. rst-class:: classref-property-setget
  957. - |void| **set_sdfgi_use_occlusion**\ (\ value\: :ref:`bool<class_bool>`\ )
  958. - :ref:`bool<class_bool>` **is_sdfgi_using_occlusion**\ (\ )
  959. 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.
  960. .. rst-class:: classref-item-separator
  961. ----
  962. .. _class_Environment_property_sdfgi_y_scale:
  963. .. rst-class:: classref-property
  964. :ref:`SDFGIYScale<enum_Environment_SDFGIYScale>` **sdfgi_y_scale** = ``1`` :ref:`🔗<class_Environment_property_sdfgi_y_scale>`
  965. .. rst-class:: classref-property-setget
  966. - |void| **set_sdfgi_y_scale**\ (\ value\: :ref:`SDFGIYScale<enum_Environment_SDFGIYScale>`\ )
  967. - :ref:`SDFGIYScale<enum_Environment_SDFGIYScale>` **get_sdfgi_y_scale**\ (\ )
  968. 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).
  969. .. rst-class:: classref-item-separator
  970. ----
  971. .. _class_Environment_property_sky:
  972. .. rst-class:: classref-property
  973. :ref:`Sky<class_Sky>` **sky** :ref:`🔗<class_Environment_property_sky>`
  974. .. rst-class:: classref-property-setget
  975. - |void| **set_sky**\ (\ value\: :ref:`Sky<class_Sky>`\ )
  976. - :ref:`Sky<class_Sky>` **get_sky**\ (\ )
  977. The :ref:`Sky<class_Sky>` resource used for this **Environment**.
  978. .. rst-class:: classref-item-separator
  979. ----
  980. .. _class_Environment_property_sky_custom_fov:
  981. .. rst-class:: classref-property
  982. :ref:`float<class_float>` **sky_custom_fov** = ``0.0`` :ref:`🔗<class_Environment_property_sky_custom_fov>`
  983. .. rst-class:: classref-property-setget
  984. - |void| **set_sky_custom_fov**\ (\ value\: :ref:`float<class_float>`\ )
  985. - :ref:`float<class_float>` **get_sky_custom_fov**\ (\ )
  986. 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.
  987. .. rst-class:: classref-item-separator
  988. ----
  989. .. _class_Environment_property_sky_rotation:
  990. .. rst-class:: classref-property
  991. :ref:`Vector3<class_Vector3>` **sky_rotation** = ``Vector3(0, 0, 0)`` :ref:`🔗<class_Environment_property_sky_rotation>`
  992. .. rst-class:: classref-property-setget
  993. - |void| **set_sky_rotation**\ (\ value\: :ref:`Vector3<class_Vector3>`\ )
  994. - :ref:`Vector3<class_Vector3>` **get_sky_rotation**\ (\ )
  995. The rotation to use for sky rendering.
  996. .. rst-class:: classref-item-separator
  997. ----
  998. .. _class_Environment_property_ssao_ao_channel_affect:
  999. .. rst-class:: classref-property
  1000. :ref:`float<class_float>` **ssao_ao_channel_affect** = ``0.0`` :ref:`🔗<class_Environment_property_ssao_ao_channel_affect>`
  1001. .. rst-class:: classref-property-setget
  1002. - |void| **set_ssao_ao_channel_affect**\ (\ value\: :ref:`float<class_float>`\ )
  1003. - :ref:`float<class_float>` **get_ssao_ao_channel_affect**\ (\ )
  1004. 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.
  1005. .. rst-class:: classref-item-separator
  1006. ----
  1007. .. _class_Environment_property_ssao_detail:
  1008. .. rst-class:: classref-property
  1009. :ref:`float<class_float>` **ssao_detail** = ``0.5`` :ref:`🔗<class_Environment_property_ssao_detail>`
  1010. .. rst-class:: classref-property-setget
  1011. - |void| **set_ssao_detail**\ (\ value\: :ref:`float<class_float>`\ )
  1012. - :ref:`float<class_float>` **get_ssao_detail**\ (\ )
  1013. 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.
  1014. .. rst-class:: classref-item-separator
  1015. ----
  1016. .. _class_Environment_property_ssao_enabled:
  1017. .. rst-class:: classref-property
  1018. :ref:`bool<class_bool>` **ssao_enabled** = ``false`` :ref:`🔗<class_Environment_property_ssao_enabled>`
  1019. .. rst-class:: classref-property-setget
  1020. - |void| **set_ssao_enabled**\ (\ value\: :ref:`bool<class_bool>`\ )
  1021. - :ref:`bool<class_bool>` **is_ssao_enabled**\ (\ )
  1022. 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.
  1023. \ **Note:** SSAO is only supported in the Forward+ rendering method, not Mobile or Compatibility.
  1024. .. rst-class:: classref-item-separator
  1025. ----
  1026. .. _class_Environment_property_ssao_horizon:
  1027. .. rst-class:: classref-property
  1028. :ref:`float<class_float>` **ssao_horizon** = ``0.06`` :ref:`🔗<class_Environment_property_ssao_horizon>`
  1029. .. rst-class:: classref-property-setget
  1030. - |void| **set_ssao_horizon**\ (\ value\: :ref:`float<class_float>`\ )
  1031. - :ref:`float<class_float>` **get_ssao_horizon**\ (\ )
  1032. 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.
  1033. .. rst-class:: classref-item-separator
  1034. ----
  1035. .. _class_Environment_property_ssao_intensity:
  1036. .. rst-class:: classref-property
  1037. :ref:`float<class_float>` **ssao_intensity** = ``2.0`` :ref:`🔗<class_Environment_property_ssao_intensity>`
  1038. .. rst-class:: classref-property-setget
  1039. - |void| **set_ssao_intensity**\ (\ value\: :ref:`float<class_float>`\ )
  1040. - :ref:`float<class_float>` **get_ssao_intensity**\ (\ )
  1041. 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.
  1042. .. rst-class:: classref-item-separator
  1043. ----
  1044. .. _class_Environment_property_ssao_light_affect:
  1045. .. rst-class:: classref-property
  1046. :ref:`float<class_float>` **ssao_light_affect** = ``0.0`` :ref:`🔗<class_Environment_property_ssao_light_affect>`
  1047. .. rst-class:: classref-property-setget
  1048. - |void| **set_ssao_direct_light_affect**\ (\ value\: :ref:`float<class_float>`\ )
  1049. - :ref:`float<class_float>` **get_ssao_direct_light_affect**\ (\ )
  1050. 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.
  1051. .. rst-class:: classref-item-separator
  1052. ----
  1053. .. _class_Environment_property_ssao_power:
  1054. .. rst-class:: classref-property
  1055. :ref:`float<class_float>` **ssao_power** = ``1.5`` :ref:`🔗<class_Environment_property_ssao_power>`
  1056. .. rst-class:: classref-property-setget
  1057. - |void| **set_ssao_power**\ (\ value\: :ref:`float<class_float>`\ )
  1058. - :ref:`float<class_float>` **get_ssao_power**\ (\ )
  1059. 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.
  1060. .. rst-class:: classref-item-separator
  1061. ----
  1062. .. _class_Environment_property_ssao_radius:
  1063. .. rst-class:: classref-property
  1064. :ref:`float<class_float>` **ssao_radius** = ``1.0`` :ref:`🔗<class_Environment_property_ssao_radius>`
  1065. .. rst-class:: classref-property-setget
  1066. - |void| **set_ssao_radius**\ (\ value\: :ref:`float<class_float>`\ )
  1067. - :ref:`float<class_float>` **get_ssao_radius**\ (\ )
  1068. 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.
  1069. .. rst-class:: classref-item-separator
  1070. ----
  1071. .. _class_Environment_property_ssao_sharpness:
  1072. .. rst-class:: classref-property
  1073. :ref:`float<class_float>` **ssao_sharpness** = ``0.98`` :ref:`🔗<class_Environment_property_ssao_sharpness>`
  1074. .. rst-class:: classref-property-setget
  1075. - |void| **set_ssao_sharpness**\ (\ value\: :ref:`float<class_float>`\ )
  1076. - :ref:`float<class_float>` **get_ssao_sharpness**\ (\ )
  1077. 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.
  1078. .. rst-class:: classref-item-separator
  1079. ----
  1080. .. _class_Environment_property_ssil_enabled:
  1081. .. rst-class:: classref-property
  1082. :ref:`bool<class_bool>` **ssil_enabled** = ``false`` :ref:`🔗<class_Environment_property_ssil_enabled>`
  1083. .. rst-class:: classref-property-setget
  1084. - |void| **set_ssil_enabled**\ (\ value\: :ref:`bool<class_bool>`\ )
  1085. - :ref:`bool<class_bool>` **is_ssil_enabled**\ (\ )
  1086. 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>`.
  1087. \ **Note:** SSIL is only supported in the Forward+ rendering method, not Mobile or Compatibility.
  1088. .. rst-class:: classref-item-separator
  1089. ----
  1090. .. _class_Environment_property_ssil_intensity:
  1091. .. rst-class:: classref-property
  1092. :ref:`float<class_float>` **ssil_intensity** = ``1.0`` :ref:`🔗<class_Environment_property_ssil_intensity>`
  1093. .. rst-class:: classref-property-setget
  1094. - |void| **set_ssil_intensity**\ (\ value\: :ref:`float<class_float>`\ )
  1095. - :ref:`float<class_float>` **get_ssil_intensity**\ (\ )
  1096. The brightness multiplier for the screen-space indirect lighting effect. A higher value will result in brighter light.
  1097. .. rst-class:: classref-item-separator
  1098. ----
  1099. .. _class_Environment_property_ssil_normal_rejection:
  1100. .. rst-class:: classref-property
  1101. :ref:`float<class_float>` **ssil_normal_rejection** = ``1.0`` :ref:`🔗<class_Environment_property_ssil_normal_rejection>`
  1102. .. rst-class:: classref-property-setget
  1103. - |void| **set_ssil_normal_rejection**\ (\ value\: :ref:`float<class_float>`\ )
  1104. - :ref:`float<class_float>` **get_ssil_normal_rejection**\ (\ )
  1105. 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.
  1106. .. rst-class:: classref-item-separator
  1107. ----
  1108. .. _class_Environment_property_ssil_radius:
  1109. .. rst-class:: classref-property
  1110. :ref:`float<class_float>` **ssil_radius** = ``5.0`` :ref:`🔗<class_Environment_property_ssil_radius>`
  1111. .. rst-class:: classref-property-setget
  1112. - |void| **set_ssil_radius**\ (\ value\: :ref:`float<class_float>`\ )
  1113. - :ref:`float<class_float>` **get_ssil_radius**\ (\ )
  1114. 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.
  1115. .. rst-class:: classref-item-separator
  1116. ----
  1117. .. _class_Environment_property_ssil_sharpness:
  1118. .. rst-class:: classref-property
  1119. :ref:`float<class_float>` **ssil_sharpness** = ``0.98`` :ref:`🔗<class_Environment_property_ssil_sharpness>`
  1120. .. rst-class:: classref-property-setget
  1121. - |void| **set_ssil_sharpness**\ (\ value\: :ref:`float<class_float>`\ )
  1122. - :ref:`float<class_float>` **get_ssil_sharpness**\ (\ )
  1123. 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.
  1124. .. rst-class:: classref-item-separator
  1125. ----
  1126. .. _class_Environment_property_ssr_depth_tolerance:
  1127. .. rst-class:: classref-property
  1128. :ref:`float<class_float>` **ssr_depth_tolerance** = ``0.5`` :ref:`🔗<class_Environment_property_ssr_depth_tolerance>`
  1129. .. rst-class:: classref-property-setget
  1130. - |void| **set_ssr_depth_tolerance**\ (\ value\: :ref:`float<class_float>`\ )
  1131. - :ref:`float<class_float>` **get_ssr_depth_tolerance**\ (\ )
  1132. The depth tolerance for screen-space reflections.
  1133. .. rst-class:: classref-item-separator
  1134. ----
  1135. .. _class_Environment_property_ssr_enabled:
  1136. .. rst-class:: classref-property
  1137. :ref:`bool<class_bool>` **ssr_enabled** = ``false`` :ref:`🔗<class_Environment_property_ssr_enabled>`
  1138. .. rst-class:: classref-property-setget
  1139. - |void| **set_ssr_enabled**\ (\ value\: :ref:`bool<class_bool>`\ )
  1140. - :ref:`bool<class_bool>` **is_ssr_enabled**\ (\ )
  1141. 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.
  1142. \ **Note:** SSR is only supported in the Forward+ rendering method, not Mobile or Compatibility.
  1143. \ **Note:** SSR is not supported on viewports that have a transparent background (where :ref:`Viewport.transparent_bg<class_Viewport_property_transparent_bg>` is ``true``).
  1144. .. rst-class:: classref-item-separator
  1145. ----
  1146. .. _class_Environment_property_ssr_fade_in:
  1147. .. rst-class:: classref-property
  1148. :ref:`float<class_float>` **ssr_fade_in** = ``0.15`` :ref:`🔗<class_Environment_property_ssr_fade_in>`
  1149. .. rst-class:: classref-property-setget
  1150. - |void| **set_ssr_fade_in**\ (\ value\: :ref:`float<class_float>`\ )
  1151. - :ref:`float<class_float>` **get_ssr_fade_in**\ (\ )
  1152. 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``).
  1153. .. rst-class:: classref-item-separator
  1154. ----
  1155. .. _class_Environment_property_ssr_fade_out:
  1156. .. rst-class:: classref-property
  1157. :ref:`float<class_float>` **ssr_fade_out** = ``2.0`` :ref:`🔗<class_Environment_property_ssr_fade_out>`
  1158. .. rst-class:: classref-property-setget
  1159. - |void| **set_ssr_fade_out**\ (\ value\: :ref:`float<class_float>`\ )
  1160. - :ref:`float<class_float>` **get_ssr_fade_out**\ (\ )
  1161. 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``).
  1162. .. rst-class:: classref-item-separator
  1163. ----
  1164. .. _class_Environment_property_ssr_max_steps:
  1165. .. rst-class:: classref-property
  1166. :ref:`int<class_int>` **ssr_max_steps** = ``64`` :ref:`🔗<class_Environment_property_ssr_max_steps>`
  1167. .. rst-class:: classref-property-setget
  1168. - |void| **set_ssr_max_steps**\ (\ value\: :ref:`int<class_int>`\ )
  1169. - :ref:`int<class_int>` **get_ssr_max_steps**\ (\ )
  1170. The maximum number of steps for screen-space reflections. Higher values are slower.
  1171. .. rst-class:: classref-item-separator
  1172. ----
  1173. .. _class_Environment_property_tonemap_exposure:
  1174. .. rst-class:: classref-property
  1175. :ref:`float<class_float>` **tonemap_exposure** = ``1.0`` :ref:`🔗<class_Environment_property_tonemap_exposure>`
  1176. .. rst-class:: classref-property-setget
  1177. - |void| **set_tonemap_exposure**\ (\ value\: :ref:`float<class_float>`\ )
  1178. - :ref:`float<class_float>` **get_tonemap_exposure**\ (\ )
  1179. Adjusts the brightness of values before they are provided to the tonemapper. Higher :ref:`tonemap_exposure<class_Environment_property_tonemap_exposure>` values result in a brighter image. See also :ref:`tonemap_white<class_Environment_property_tonemap_white>`.
  1180. \ **Note:** Values provided to the tonemapper will also be multiplied by ``2.0`` and ``1.8`` for :ref:`TONE_MAPPER_FILMIC<class_Environment_constant_TONE_MAPPER_FILMIC>` and :ref:`TONE_MAPPER_ACES<class_Environment_constant_TONE_MAPPER_ACES>` respectively to produce a similar apparent brightness as :ref:`TONE_MAPPER_LINEAR<class_Environment_constant_TONE_MAPPER_LINEAR>`.
  1181. .. rst-class:: classref-item-separator
  1182. ----
  1183. .. _class_Environment_property_tonemap_mode:
  1184. .. rst-class:: classref-property
  1185. :ref:`ToneMapper<enum_Environment_ToneMapper>` **tonemap_mode** = ``0`` :ref:`🔗<class_Environment_property_tonemap_mode>`
  1186. .. rst-class:: classref-property-setget
  1187. - |void| **set_tonemapper**\ (\ value\: :ref:`ToneMapper<enum_Environment_ToneMapper>`\ )
  1188. - :ref:`ToneMapper<enum_Environment_ToneMapper>` **get_tonemapper**\ (\ )
  1189. The tonemapping mode to use. Tonemapping is the process that "converts" HDR values to be suitable for rendering on an LDR display. (Godot doesn't support rendering on HDR displays yet.)
  1190. .. rst-class:: classref-item-separator
  1191. ----
  1192. .. _class_Environment_property_tonemap_white:
  1193. .. rst-class:: classref-property
  1194. :ref:`float<class_float>` **tonemap_white** = ``1.0`` :ref:`🔗<class_Environment_property_tonemap_white>`
  1195. .. rst-class:: classref-property-setget
  1196. - |void| **set_tonemap_white**\ (\ value\: :ref:`float<class_float>`\ )
  1197. - :ref:`float<class_float>` **get_tonemap_white**\ (\ )
  1198. The white reference value for tonemapping, which indicates where bright white is located in the scale of values provided to the tonemapper. For photorealistic lighting, recommended values are between ``6.0`` and ``8.0``. Higher values result in less blown out highlights, but may make the scene appear lower contrast. See also :ref:`tonemap_exposure<class_Environment_property_tonemap_exposure>`.
  1199. \ **Note:** :ref:`tonemap_white<class_Environment_property_tonemap_white>` is ignored when using :ref:`TONE_MAPPER_LINEAR<class_Environment_constant_TONE_MAPPER_LINEAR>` or :ref:`TONE_MAPPER_AGX<class_Environment_constant_TONE_MAPPER_AGX>`.
  1200. .. rst-class:: classref-item-separator
  1201. ----
  1202. .. _class_Environment_property_volumetric_fog_albedo:
  1203. .. rst-class:: classref-property
  1204. :ref:`Color<class_Color>` **volumetric_fog_albedo** = ``Color(1, 1, 1, 1)`` :ref:`🔗<class_Environment_property_volumetric_fog_albedo>`
  1205. .. rst-class:: classref-property-setget
  1206. - |void| **set_volumetric_fog_albedo**\ (\ value\: :ref:`Color<class_Color>`\ )
  1207. - :ref:`Color<class_Color>` **get_volumetric_fog_albedo**\ (\ )
  1208. 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.
  1209. .. rst-class:: classref-item-separator
  1210. ----
  1211. .. _class_Environment_property_volumetric_fog_ambient_inject:
  1212. .. rst-class:: classref-property
  1213. :ref:`float<class_float>` **volumetric_fog_ambient_inject** = ``0.0`` :ref:`🔗<class_Environment_property_volumetric_fog_ambient_inject>`
  1214. .. rst-class:: classref-property-setget
  1215. - |void| **set_volumetric_fog_ambient_inject**\ (\ value\: :ref:`float<class_float>`\ )
  1216. - :ref:`float<class_float>` **get_volumetric_fog_ambient_inject**\ (\ )
  1217. 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``.
  1218. \ **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.
  1219. .. rst-class:: classref-item-separator
  1220. ----
  1221. .. _class_Environment_property_volumetric_fog_anisotropy:
  1222. .. rst-class:: classref-property
  1223. :ref:`float<class_float>` **volumetric_fog_anisotropy** = ``0.2`` :ref:`🔗<class_Environment_property_volumetric_fog_anisotropy>`
  1224. .. rst-class:: classref-property-setget
  1225. - |void| **set_volumetric_fog_anisotropy**\ (\ value\: :ref:`float<class_float>`\ )
  1226. - :ref:`float<class_float>` **get_volumetric_fog_anisotropy**\ (\ )
  1227. 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.
  1228. .. rst-class:: classref-item-separator
  1229. ----
  1230. .. _class_Environment_property_volumetric_fog_density:
  1231. .. rst-class:: classref-property
  1232. :ref:`float<class_float>` **volumetric_fog_density** = ``0.05`` :ref:`🔗<class_Environment_property_volumetric_fog_density>`
  1233. .. rst-class:: classref-property-setget
  1234. - |void| **set_volumetric_fog_density**\ (\ value\: :ref:`float<class_float>`\ )
  1235. - :ref:`float<class_float>` **get_volumetric_fog_density**\ (\ )
  1236. 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.
  1237. A value of ``0.0`` disables global volumetric fog while allowing :ref:`FogVolume<class_FogVolume>`\ s to display volumetric fog in specific areas.
  1238. 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.
  1239. .. rst-class:: classref-item-separator
  1240. ----
  1241. .. _class_Environment_property_volumetric_fog_detail_spread:
  1242. .. rst-class:: classref-property
  1243. :ref:`float<class_float>` **volumetric_fog_detail_spread** = ``2.0`` :ref:`🔗<class_Environment_property_volumetric_fog_detail_spread>`
  1244. .. rst-class:: classref-property-setget
  1245. - |void| **set_volumetric_fog_detail_spread**\ (\ value\: :ref:`float<class_float>`\ )
  1246. - :ref:`float<class_float>` **get_volumetric_fog_detail_spread**\ (\ )
  1247. 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.
  1248. .. rst-class:: classref-item-separator
  1249. ----
  1250. .. _class_Environment_property_volumetric_fog_emission:
  1251. .. rst-class:: classref-property
  1252. :ref:`Color<class_Color>` **volumetric_fog_emission** = ``Color(0, 0, 0, 1)`` :ref:`🔗<class_Environment_property_volumetric_fog_emission>`
  1253. .. rst-class:: classref-property-setget
  1254. - |void| **set_volumetric_fog_emission**\ (\ value\: :ref:`Color<class_Color>`\ )
  1255. - :ref:`Color<class_Color>` **get_volumetric_fog_emission**\ (\ )
  1256. 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.
  1257. .. rst-class:: classref-item-separator
  1258. ----
  1259. .. _class_Environment_property_volumetric_fog_emission_energy:
  1260. .. rst-class:: classref-property
  1261. :ref:`float<class_float>` **volumetric_fog_emission_energy** = ``1.0`` :ref:`🔗<class_Environment_property_volumetric_fog_emission_energy>`
  1262. .. rst-class:: classref-property-setget
  1263. - |void| **set_volumetric_fog_emission_energy**\ (\ value\: :ref:`float<class_float>`\ )
  1264. - :ref:`float<class_float>` **get_volumetric_fog_emission_energy**\ (\ )
  1265. The brightness of the emitted light from the volumetric fog.
  1266. .. rst-class:: classref-item-separator
  1267. ----
  1268. .. _class_Environment_property_volumetric_fog_enabled:
  1269. .. rst-class:: classref-property
  1270. :ref:`bool<class_bool>` **volumetric_fog_enabled** = ``false`` :ref:`🔗<class_Environment_property_volumetric_fog_enabled>`
  1271. .. rst-class:: classref-property-setget
  1272. - |void| **set_volumetric_fog_enabled**\ (\ value\: :ref:`bool<class_bool>`\ )
  1273. - :ref:`bool<class_bool>` **is_volumetric_fog_enabled**\ (\ )
  1274. 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.
  1275. \ **Note:** Volumetric fog is only supported in the Forward+ rendering method, not Mobile or Compatibility.
  1276. .. rst-class:: classref-item-separator
  1277. ----
  1278. .. _class_Environment_property_volumetric_fog_gi_inject:
  1279. .. rst-class:: classref-property
  1280. :ref:`float<class_float>` **volumetric_fog_gi_inject** = ``1.0`` :ref:`🔗<class_Environment_property_volumetric_fog_gi_inject>`
  1281. .. rst-class:: classref-property-setget
  1282. - |void| **set_volumetric_fog_gi_inject**\ (\ value\: :ref:`float<class_float>`\ )
  1283. - :ref:`float<class_float>` **get_volumetric_fog_gi_inject**\ (\ )
  1284. 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``.
  1285. \ **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.
  1286. \ **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.
  1287. .. rst-class:: classref-item-separator
  1288. ----
  1289. .. _class_Environment_property_volumetric_fog_length:
  1290. .. rst-class:: classref-property
  1291. :ref:`float<class_float>` **volumetric_fog_length** = ``64.0`` :ref:`🔗<class_Environment_property_volumetric_fog_length>`
  1292. .. rst-class:: classref-property-setget
  1293. - |void| **set_volumetric_fog_length**\ (\ value\: :ref:`float<class_float>`\ )
  1294. - :ref:`float<class_float>` **get_volumetric_fog_length**\ (\ )
  1295. 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>`.
  1296. .. rst-class:: classref-item-separator
  1297. ----
  1298. .. _class_Environment_property_volumetric_fog_sky_affect:
  1299. .. rst-class:: classref-property
  1300. :ref:`float<class_float>` **volumetric_fog_sky_affect** = ``1.0`` :ref:`🔗<class_Environment_property_volumetric_fog_sky_affect>`
  1301. .. rst-class:: classref-property-setget
  1302. - |void| **set_volumetric_fog_sky_affect**\ (\ value\: :ref:`float<class_float>`\ )
  1303. - :ref:`float<class_float>` **get_volumetric_fog_sky_affect**\ (\ )
  1304. 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.
  1305. \ **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``.
  1306. .. rst-class:: classref-item-separator
  1307. ----
  1308. .. _class_Environment_property_volumetric_fog_temporal_reprojection_amount:
  1309. .. rst-class:: classref-property
  1310. :ref:`float<class_float>` **volumetric_fog_temporal_reprojection_amount** = ``0.9`` :ref:`🔗<class_Environment_property_volumetric_fog_temporal_reprojection_amount>`
  1311. .. rst-class:: classref-property-setget
  1312. - |void| **set_volumetric_fog_temporal_reprojection_amount**\ (\ value\: :ref:`float<class_float>`\ )
  1313. - :ref:`float<class_float>` **get_volumetric_fog_temporal_reprojection_amount**\ (\ )
  1314. 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.
  1315. .. rst-class:: classref-item-separator
  1316. ----
  1317. .. _class_Environment_property_volumetric_fog_temporal_reprojection_enabled:
  1318. .. rst-class:: classref-property
  1319. :ref:`bool<class_bool>` **volumetric_fog_temporal_reprojection_enabled** = ``true`` :ref:`🔗<class_Environment_property_volumetric_fog_temporal_reprojection_enabled>`
  1320. .. rst-class:: classref-property-setget
  1321. - |void| **set_volumetric_fog_temporal_reprojection_enabled**\ (\ value\: :ref:`bool<class_bool>`\ )
  1322. - :ref:`bool<class_bool>` **is_volumetric_fog_temporal_reprojection_enabled**\ (\ )
  1323. 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.
  1324. .. rst-class:: classref-section-separator
  1325. ----
  1326. .. rst-class:: classref-descriptions-group
  1327. Method Descriptions
  1328. -------------------
  1329. .. _class_Environment_method_get_glow_level:
  1330. .. rst-class:: classref-method
  1331. :ref:`float<class_float>` **get_glow_level**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Environment_method_get_glow_level>`
  1332. Returns the intensity of the glow level ``idx``.
  1333. .. rst-class:: classref-item-separator
  1334. ----
  1335. .. _class_Environment_method_set_glow_level:
  1336. .. rst-class:: classref-method
  1337. |void| **set_glow_level**\ (\ idx\: :ref:`int<class_int>`, intensity\: :ref:`float<class_float>`\ ) :ref:`🔗<class_Environment_method_set_glow_level>`
  1338. 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.
  1339. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  1340. .. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
  1341. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  1342. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  1343. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  1344. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  1345. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  1346. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  1347. .. |void| replace:: :abbr:`void (No return value.)`