class_environment.rst 116 KB

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