Files
godot-docs-l10n/classes/zh_Hans/class_environment.rst
Rémi Verschelde c3f2364c10 Sync classref with 4.6 branch
Lots of translations invalidated (fuzzied) as we just synced Weblate.
2025-12-19 16:39:51 +01:00

2408 lines
133 KiB
ReStructuredText
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

:github_url: hide
.. _class_Environment:
Environment
===========
**继承:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
定义渲染选项的资源,用于环境节点(例如 :ref:`WorldEnvironment<class_WorldEnvironment>`\ )。
.. rst-class:: classref-introduction-group
描述
----
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:
- Depth of Field Blur
- Auto Exposure
- Glow
- Tonemap
- Adjustments
.. rst-class:: classref-introduction-group
教程
----
- :doc:`环境和后期处理 <../tutorials/3d/environment_and_post_processing>`
- :doc:`高动态范围照明 <../tutorials/3d/high_dynamic_range>`
- `3D 材质测试演示 <https://godotengine.org/asset-library/asset/2742>`__
- `第三人称射击TPS演示 <https://godotengine.org/asset-library/asset/2710>`__
.. rst-class:: classref-reftable-group
属性
----
.. table::
:widths: auto
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`float<class_float>` | :ref:`adjustment_brightness<class_Environment_property_adjustment_brightness>` | ``1.0`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`Texture<class_Texture>` | :ref:`adjustment_color_correction<class_Environment_property_adjustment_color_correction>` | |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`float<class_float>` | :ref:`adjustment_contrast<class_Environment_property_adjustment_contrast>` | ``1.0`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`bool<class_bool>` | :ref:`adjustment_enabled<class_Environment_property_adjustment_enabled>` | ``false`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`float<class_float>` | :ref:`adjustment_saturation<class_Environment_property_adjustment_saturation>` | ``1.0`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`Color<class_Color>` | :ref:`ambient_light_color<class_Environment_property_ambient_light_color>` | ``Color(0, 0, 0, 1)`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`float<class_float>` | :ref:`ambient_light_energy<class_Environment_property_ambient_light_energy>` | ``1.0`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`float<class_float>` | :ref:`ambient_light_sky_contribution<class_Environment_property_ambient_light_sky_contribution>` | ``1.0`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`AmbientSource<enum_Environment_AmbientSource>` | :ref:`ambient_light_source<class_Environment_property_ambient_light_source>` | ``0`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`int<class_int>` | :ref:`background_camera_feed_id<class_Environment_property_background_camera_feed_id>` | ``1`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`int<class_int>` | :ref:`background_canvas_max_layer<class_Environment_property_background_canvas_max_layer>` | ``0`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`Color<class_Color>` | :ref:`background_color<class_Environment_property_background_color>` | ``Color(0, 0, 0, 1)`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`float<class_float>` | :ref:`background_energy_multiplier<class_Environment_property_background_energy_multiplier>` | ``1.0`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`float<class_float>` | :ref:`background_intensity<class_Environment_property_background_intensity>` | ``30000.0`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`BGMode<enum_Environment_BGMode>` | :ref:`background_mode<class_Environment_property_background_mode>` | ``0`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`float<class_float>` | :ref:`fog_aerial_perspective<class_Environment_property_fog_aerial_perspective>` | ``0.0`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`float<class_float>` | :ref:`fog_density<class_Environment_property_fog_density>` | ``0.01`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`float<class_float>` | :ref:`fog_depth_begin<class_Environment_property_fog_depth_begin>` | ``10.0`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`float<class_float>` | :ref:`fog_depth_curve<class_Environment_property_fog_depth_curve>` | ``1.0`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`float<class_float>` | :ref:`fog_depth_end<class_Environment_property_fog_depth_end>` | ``100.0`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`bool<class_bool>` | :ref:`fog_enabled<class_Environment_property_fog_enabled>` | ``false`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`float<class_float>` | :ref:`fog_height<class_Environment_property_fog_height>` | ``0.0`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`float<class_float>` | :ref:`fog_height_density<class_Environment_property_fog_height_density>` | ``0.0`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`Color<class_Color>` | :ref:`fog_light_color<class_Environment_property_fog_light_color>` | ``Color(0.518, 0.553, 0.608, 1)`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`float<class_float>` | :ref:`fog_light_energy<class_Environment_property_fog_light_energy>` | ``1.0`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`FogMode<enum_Environment_FogMode>` | :ref:`fog_mode<class_Environment_property_fog_mode>` | ``0`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`float<class_float>` | :ref:`fog_sky_affect<class_Environment_property_fog_sky_affect>` | ``1.0`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`float<class_float>` | :ref:`fog_sun_scatter<class_Environment_property_fog_sun_scatter>` | ``0.0`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`GlowBlendMode<enum_Environment_GlowBlendMode>` | :ref:`glow_blend_mode<class_Environment_property_glow_blend_mode>` | ``1`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`float<class_float>` | :ref:`glow_bloom<class_Environment_property_glow_bloom>` | ``0.0`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`bool<class_bool>` | :ref:`glow_enabled<class_Environment_property_glow_enabled>` | ``false`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`float<class_float>` | :ref:`glow_hdr_luminance_cap<class_Environment_property_glow_hdr_luminance_cap>` | ``12.0`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`float<class_float>` | :ref:`glow_hdr_scale<class_Environment_property_glow_hdr_scale>` | ``2.0`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`float<class_float>` | :ref:`glow_hdr_threshold<class_Environment_property_glow_hdr_threshold>` | ``1.0`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`float<class_float>` | :ref:`glow_intensity<class_Environment_property_glow_intensity>` | ``0.3`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`float<class_float>` | :ref:`glow_levels/1<class_Environment_property_glow_levels/1>` | ``0.0`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`float<class_float>` | :ref:`glow_levels/2<class_Environment_property_glow_levels/2>` | ``0.8`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`float<class_float>` | :ref:`glow_levels/3<class_Environment_property_glow_levels/3>` | ``0.4`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`float<class_float>` | :ref:`glow_levels/4<class_Environment_property_glow_levels/4>` | ``0.1`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`float<class_float>` | :ref:`glow_levels/5<class_Environment_property_glow_levels/5>` | ``0.0`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`float<class_float>` | :ref:`glow_levels/6<class_Environment_property_glow_levels/6>` | ``0.0`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`float<class_float>` | :ref:`glow_levels/7<class_Environment_property_glow_levels/7>` | ``0.0`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`Texture<class_Texture>` | :ref:`glow_map<class_Environment_property_glow_map>` | |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`float<class_float>` | :ref:`glow_map_strength<class_Environment_property_glow_map_strength>` | ``0.8`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`float<class_float>` | :ref:`glow_mix<class_Environment_property_glow_mix>` | ``0.05`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`bool<class_bool>` | :ref:`glow_normalized<class_Environment_property_glow_normalized>` | ``false`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`float<class_float>` | :ref:`glow_strength<class_Environment_property_glow_strength>` | ``1.0`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`ReflectionSource<enum_Environment_ReflectionSource>` | :ref:`reflected_light_source<class_Environment_property_reflected_light_source>` | ``0`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`float<class_float>` | :ref:`sdfgi_bounce_feedback<class_Environment_property_sdfgi_bounce_feedback>` | ``0.5`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`float<class_float>` | :ref:`sdfgi_cascade0_distance<class_Environment_property_sdfgi_cascade0_distance>` | ``12.8`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`int<class_int>` | :ref:`sdfgi_cascades<class_Environment_property_sdfgi_cascades>` | ``4`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`bool<class_bool>` | :ref:`sdfgi_enabled<class_Environment_property_sdfgi_enabled>` | ``false`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`float<class_float>` | :ref:`sdfgi_energy<class_Environment_property_sdfgi_energy>` | ``1.0`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`float<class_float>` | :ref:`sdfgi_max_distance<class_Environment_property_sdfgi_max_distance>` | ``204.8`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`float<class_float>` | :ref:`sdfgi_min_cell_size<class_Environment_property_sdfgi_min_cell_size>` | ``0.2`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`float<class_float>` | :ref:`sdfgi_normal_bias<class_Environment_property_sdfgi_normal_bias>` | ``1.1`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`float<class_float>` | :ref:`sdfgi_probe_bias<class_Environment_property_sdfgi_probe_bias>` | ``1.1`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`bool<class_bool>` | :ref:`sdfgi_read_sky_light<class_Environment_property_sdfgi_read_sky_light>` | ``true`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`bool<class_bool>` | :ref:`sdfgi_use_occlusion<class_Environment_property_sdfgi_use_occlusion>` | ``false`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`SDFGIYScale<enum_Environment_SDFGIYScale>` | :ref:`sdfgi_y_scale<class_Environment_property_sdfgi_y_scale>` | ``1`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`Sky<class_Sky>` | :ref:`sky<class_Environment_property_sky>` | |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`float<class_float>` | :ref:`sky_custom_fov<class_Environment_property_sky_custom_fov>` | ``0.0`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`Vector3<class_Vector3>` | :ref:`sky_rotation<class_Environment_property_sky_rotation>` | ``Vector3(0, 0, 0)`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`float<class_float>` | :ref:`ssao_ao_channel_affect<class_Environment_property_ssao_ao_channel_affect>` | ``0.0`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`float<class_float>` | :ref:`ssao_detail<class_Environment_property_ssao_detail>` | ``0.5`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`bool<class_bool>` | :ref:`ssao_enabled<class_Environment_property_ssao_enabled>` | ``false`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`float<class_float>` | :ref:`ssao_horizon<class_Environment_property_ssao_horizon>` | ``0.06`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`float<class_float>` | :ref:`ssao_intensity<class_Environment_property_ssao_intensity>` | ``2.0`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`float<class_float>` | :ref:`ssao_light_affect<class_Environment_property_ssao_light_affect>` | ``0.0`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`float<class_float>` | :ref:`ssao_power<class_Environment_property_ssao_power>` | ``1.5`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`float<class_float>` | :ref:`ssao_radius<class_Environment_property_ssao_radius>` | ``1.0`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`float<class_float>` | :ref:`ssao_sharpness<class_Environment_property_ssao_sharpness>` | ``0.98`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`bool<class_bool>` | :ref:`ssil_enabled<class_Environment_property_ssil_enabled>` | ``false`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`float<class_float>` | :ref:`ssil_intensity<class_Environment_property_ssil_intensity>` | ``1.0`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`float<class_float>` | :ref:`ssil_normal_rejection<class_Environment_property_ssil_normal_rejection>` | ``1.0`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`float<class_float>` | :ref:`ssil_radius<class_Environment_property_ssil_radius>` | ``5.0`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`float<class_float>` | :ref:`ssil_sharpness<class_Environment_property_ssil_sharpness>` | ``0.98`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`float<class_float>` | :ref:`ssr_depth_tolerance<class_Environment_property_ssr_depth_tolerance>` | ``0.5`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`bool<class_bool>` | :ref:`ssr_enabled<class_Environment_property_ssr_enabled>` | ``false`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`float<class_float>` | :ref:`ssr_fade_in<class_Environment_property_ssr_fade_in>` | ``0.15`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`float<class_float>` | :ref:`ssr_fade_out<class_Environment_property_ssr_fade_out>` | ``2.0`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`int<class_int>` | :ref:`ssr_max_steps<class_Environment_property_ssr_max_steps>` | ``64`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`float<class_float>` | :ref:`tonemap_agx_contrast<class_Environment_property_tonemap_agx_contrast>` | ``1.25`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`float<class_float>` | :ref:`tonemap_agx_white<class_Environment_property_tonemap_agx_white>` | ``16.29`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`float<class_float>` | :ref:`tonemap_exposure<class_Environment_property_tonemap_exposure>` | ``1.0`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`ToneMapper<enum_Environment_ToneMapper>` | :ref:`tonemap_mode<class_Environment_property_tonemap_mode>` | ``0`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`float<class_float>` | :ref:`tonemap_white<class_Environment_property_tonemap_white>` | ``1.0`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`Color<class_Color>` | :ref:`volumetric_fog_albedo<class_Environment_property_volumetric_fog_albedo>` | ``Color(1, 1, 1, 1)`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`float<class_float>` | :ref:`volumetric_fog_ambient_inject<class_Environment_property_volumetric_fog_ambient_inject>` | ``0.0`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`float<class_float>` | :ref:`volumetric_fog_anisotropy<class_Environment_property_volumetric_fog_anisotropy>` | ``0.2`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`float<class_float>` | :ref:`volumetric_fog_density<class_Environment_property_volumetric_fog_density>` | ``0.05`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`float<class_float>` | :ref:`volumetric_fog_detail_spread<class_Environment_property_volumetric_fog_detail_spread>` | ``2.0`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`Color<class_Color>` | :ref:`volumetric_fog_emission<class_Environment_property_volumetric_fog_emission>` | ``Color(0, 0, 0, 1)`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`float<class_float>` | :ref:`volumetric_fog_emission_energy<class_Environment_property_volumetric_fog_emission_energy>` | ``1.0`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`bool<class_bool>` | :ref:`volumetric_fog_enabled<class_Environment_property_volumetric_fog_enabled>` | ``false`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`float<class_float>` | :ref:`volumetric_fog_gi_inject<class_Environment_property_volumetric_fog_gi_inject>` | ``1.0`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`float<class_float>` | :ref:`volumetric_fog_length<class_Environment_property_volumetric_fog_length>` | ``64.0`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`float<class_float>` | :ref:`volumetric_fog_sky_affect<class_Environment_property_volumetric_fog_sky_affect>` | ``1.0`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`float<class_float>` | :ref:`volumetric_fog_temporal_reprojection_amount<class_Environment_property_volumetric_fog_temporal_reprojection_amount>` | ``0.9`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
| :ref:`bool<class_bool>` | :ref:`volumetric_fog_temporal_reprojection_enabled<class_Environment_property_volumetric_fog_temporal_reprojection_enabled>` | ``true`` |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
.. rst-class:: classref-reftable-group
方法
----
.. table::
:widths: auto
+---------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`float<class_float>` | :ref:`get_glow_level<class_Environment_method_get_glow_level>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| |
+---------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set_glow_level<class_Environment_method_set_glow_level>`\ (\ idx\: :ref:`int<class_int>`, intensity\: :ref:`float<class_float>`\ ) |
+---------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
枚举
----
.. _enum_Environment_BGMode:
.. rst-class:: classref-enumeration
enum **BGMode**: :ref:`🔗<enum_Environment_BGMode>`
.. _class_Environment_constant_BG_CLEAR_COLOR:
.. rst-class:: classref-enumeration-constant
:ref:`BGMode<enum_Environment_BGMode>` **BG_CLEAR_COLOR** = ``0``
使用 :ref:`ProjectSettings.rendering/environment/defaults/default_clear_color<class_ProjectSettings_property_rendering/environment/defaults/default_clear_color>` 中定义的清除颜色来清除背景。
.. _class_Environment_constant_BG_COLOR:
.. rst-class:: classref-enumeration-constant
:ref:`BGMode<enum_Environment_BGMode>` **BG_COLOR** = ``1``
使用自定义的清除颜色来清除背景。
.. _class_Environment_constant_BG_SKY:
.. rst-class:: classref-enumeration-constant
:ref:`BGMode<enum_Environment_BGMode>` **BG_SKY** = ``2``
在背景中显示用户自定义的天空。
.. _class_Environment_constant_BG_CANVAS:
.. rst-class:: classref-enumeration-constant
:ref:`BGMode<enum_Environment_BGMode>` **BG_CANVAS** = ``3``
在背景中显示 :ref:`CanvasLayer<class_CanvasLayer>`\ 。
.. _class_Environment_constant_BG_KEEP:
.. rst-class:: classref-enumeration-constant
:ref:`BGMode<enum_Environment_BGMode>` **BG_KEEP** = ``4``
在屏幕上保留在背景中绘制的每个像素。这是最快的背景模式,但它只能安全地用在完全室内的场景(没有可见的天空或天空反射)。如果在背景可见的场景中启用,则移动相机时,将看到“鬼影踪迹”伪影。
.. _class_Environment_constant_BG_CAMERA_FEED:
.. rst-class:: classref-enumeration-constant
:ref:`BGMode<enum_Environment_BGMode>` **BG_CAMERA_FEED** = ``5``
在背景中显示相机源。
.. _class_Environment_constant_BG_MAX:
.. rst-class:: classref-enumeration-constant
:ref:`BGMode<enum_Environment_BGMode>` **BG_MAX** = ``6``
代表 :ref:`BGMode<enum_Environment_BGMode>` 枚举的大小。
.. rst-class:: classref-item-separator
----
.. _enum_Environment_AmbientSource:
.. rst-class:: classref-enumeration
enum **AmbientSource**: :ref:`🔗<enum_Environment_AmbientSource>`
.. _class_Environment_constant_AMBIENT_SOURCE_BG:
.. rst-class:: classref-enumeration-constant
:ref:`AmbientSource<enum_Environment_AmbientSource>` **AMBIENT_SOURCE_BG** = ``0``
从指定为背景的任何来源收集环境光。
.. _class_Environment_constant_AMBIENT_SOURCE_DISABLED:
.. rst-class:: classref-enumeration-constant
:ref:`AmbientSource<enum_Environment_AmbientSource>` **AMBIENT_SOURCE_DISABLED** = ``1``
禁用环境光。这比 :ref:`AMBIENT_SOURCE_SKY<class_Environment_constant_AMBIENT_SOURCE_SKY>` 提供了轻微的性能提升。
.. _class_Environment_constant_AMBIENT_SOURCE_COLOR:
.. rst-class:: classref-enumeration-constant
:ref:`AmbientSource<enum_Environment_AmbientSource>` **AMBIENT_SOURCE_COLOR** = ``2``
为环境光指定特定的 :ref:`Color<class_Color>`\ 。与 :ref:`AMBIENT_SOURCE_SKY<class_Environment_constant_AMBIENT_SOURCE_SKY>` 相比,这提供了轻微的性能提升。
.. _class_Environment_constant_AMBIENT_SOURCE_SKY:
.. rst-class:: classref-enumeration-constant
:ref:`AmbientSource<enum_Environment_AmbientSource>` **AMBIENT_SOURCE_SKY** = ``3``
无论背景如何,都从 :ref:`Sky<class_Sky>` 收集环境光。
.. rst-class:: classref-item-separator
----
.. _enum_Environment_ReflectionSource:
.. rst-class:: classref-enumeration
enum **ReflectionSource**: :ref:`🔗<enum_Environment_ReflectionSource>`
.. _class_Environment_constant_REFLECTION_SOURCE_BG:
.. rst-class:: classref-enumeration-constant
:ref:`ReflectionSource<enum_Environment_ReflectionSource>` **REFLECTION_SOURCE_BG** = ``0``
使用背景进行反射。
.. _class_Environment_constant_REFLECTION_SOURCE_DISABLED:
.. rst-class:: classref-enumeration-constant
:ref:`ReflectionSource<enum_Environment_ReflectionSource>` **REFLECTION_SOURCE_DISABLED** = ``1``
禁用反射。与其他选项相比,这提供了轻微的性能提升。
.. _class_Environment_constant_REFLECTION_SOURCE_SKY:
.. rst-class:: classref-enumeration-constant
:ref:`ReflectionSource<enum_Environment_ReflectionSource>` **REFLECTION_SOURCE_SKY** = ``2``
无论背景如何,都使用 :ref:`Sky<class_Sky>` 进行反射。
.. rst-class:: classref-item-separator
----
.. _enum_Environment_ToneMapper:
.. rst-class:: classref-enumeration
enum **ToneMapper**: :ref:`🔗<enum_Environment_ToneMapper>`
.. _class_Environment_constant_TONE_MAPPER_LINEAR:
.. rst-class:: classref-enumeration-constant
:ref:`ToneMapper<enum_Environment_ToneMapper>` **TONE_MAPPER_LINEAR** = ``0``
不修改颜色数据,得到线性的色调映射曲线,裁剪较亮的值时不自然,明亮的光照会过曝。这是最简单快速的色调映射器。
.. _class_Environment_constant_TONE_MAPPER_REINHARDT:
.. rst-class:: classref-enumeration-constant
:ref:`ToneMapper<enum_Environment_ToneMapper>` **TONE_MAPPER_REINHARDT** = ``1``
一种简单的色调映射曲线,会让较亮的值逐渐降低,从而防止发生裁剪。得到的图像看起来较平淡、对比度低。比 :ref:`TONE_MAPPER_LINEAR<class_Environment_constant_TONE_MAPPER_LINEAR>` 更慢。
\ **注意:**\ :ref:`tonemap_white<class_Environment_property_tonemap_white>` 在默认值 ``1.0`` 不变时,\ :ref:`TONE_MAPPER_REINHARDT<class_Environment_constant_TONE_MAPPER_REINHARDT>` 产生的图像与 :ref:`TONE_MAPPER_LINEAR<class_Environment_constant_TONE_MAPPER_LINEAR>` 相同。
.. _class_Environment_constant_TONE_MAPPER_FILMIC:
.. rst-class:: classref-enumeration-constant
:ref:`ToneMapper<enum_Environment_ToneMapper>` **TONE_MAPPER_FILMIC** = ``2``
使用类似电影胶片的色调映射曲线来防止较亮的值发生剪切,对比度比 :ref:`TONE_MAPPER_REINHARDT<class_Environment_constant_TONE_MAPPER_REINHARDT>` 更好。比 :ref:`TONE_MAPPER_REINHARDT<class_Environment_constant_TONE_MAPPER_REINHARDT>` 稍慢。
.. _class_Environment_constant_TONE_MAPPER_ACES:
.. rst-class:: classref-enumeration-constant
:ref:`ToneMapper<enum_Environment_ToneMapper>` **TONE_MAPPER_ACES** = ``3``
类似电影胶片的高对比度色调映射曲线,对较亮的值进行去饱和处理,从而获得更真实的外观。比 :ref:`TONE_MAPPER_FILMIC<class_Environment_constant_TONE_MAPPER_FILMIC>` 稍慢。
\ **注意:**\ 这种色调映射运算符在 Godot 3.x 中被称为“ACES Fitted”。
.. _class_Environment_constant_TONE_MAPPER_AGX:
.. rst-class:: classref-enumeration-constant
:ref:`ToneMapper<enum_Environment_ToneMapper>` **TONE_MAPPER_AGX** = ``4``
Uses an adjustable film-like tonemapping curve and desaturates bright values for a more realistic appearance. Better than other tonemappers at maintaining the hue of colors as they become brighter. The slowest tonemapping option.
.. rst-class:: classref-item-separator
----
.. _enum_Environment_GlowBlendMode:
.. rst-class:: classref-enumeration
enum **GlowBlendMode**: :ref:`🔗<enum_Environment_GlowBlendMode>`
.. _class_Environment_constant_GLOW_BLEND_MODE_ADDITIVE:
.. rst-class:: classref-enumeration-constant
:ref:`GlowBlendMode<enum_Environment_GlowBlendMode>` **GLOW_BLEND_MODE_ADDITIVE** = ``0``
Adds the glow effect to the scene.
.. _class_Environment_constant_GLOW_BLEND_MODE_SCREEN:
.. rst-class:: classref-enumeration-constant
:ref:`GlowBlendMode<enum_Environment_GlowBlendMode>` **GLOW_BLEND_MODE_SCREEN** = ``1``
Adds the glow effect to the scene after modifying the glow influence based on the scene value; dark values will be highly influenced by glow and bright values will not be influenced by glow. This approach avoids bright values becoming overly bright from the glow effect. :ref:`tonemap_white<class_Environment_property_tonemap_white>` is used to determine the maximum scene value where the glow should have no influence. When :ref:`tonemap_mode<class_Environment_property_tonemap_mode>` is set to :ref:`TONE_MAPPER_LINEAR<class_Environment_constant_TONE_MAPPER_LINEAR>`, a value of ``1.0`` will be used as the maximum scene value.
.. _class_Environment_constant_GLOW_BLEND_MODE_SOFTLIGHT:
.. rst-class:: classref-enumeration-constant
:ref:`GlowBlendMode<enum_Environment_GlowBlendMode>` **GLOW_BLEND_MODE_SOFTLIGHT** = ``2``
Adds the glow effect to the tonemapped image after modifying the glow influence based on the image value; dark values and bright values will not be influenced by glow and mid-range values will be highly influenced by glow. This approach avoids bright values becoming overly bright from the glow effect. The glow will have the largest influence on image values of ``0.25`` and will have no influence when applied to image values greater than ``1.0``.
.. _class_Environment_constant_GLOW_BLEND_MODE_REPLACE:
.. rst-class:: classref-enumeration-constant
:ref:`GlowBlendMode<enum_Environment_GlowBlendMode>` **GLOW_BLEND_MODE_REPLACE** = ``3``
Replaces all pixels' color by the glow effect. This can be used to simulate a full-screen blur effect by tweaking the glow parameters to match the original image's brightness or to preview glow configuration in the editor.
.. _class_Environment_constant_GLOW_BLEND_MODE_MIX:
.. rst-class:: classref-enumeration-constant
:ref:`GlowBlendMode<enum_Environment_GlowBlendMode>` **GLOW_BLEND_MODE_MIX** = ``4``
Mixes the glow image with the scene image. Best used with :ref:`glow_bloom<class_Environment_property_glow_bloom>` to avoid darkening the scene.
.. rst-class:: classref-item-separator
----
.. _enum_Environment_FogMode:
.. rst-class:: classref-enumeration
enum **FogMode**: :ref:`🔗<enum_Environment_FogMode>`
.. _class_Environment_constant_FOG_MODE_EXPONENTIAL:
.. rst-class:: classref-enumeration-constant
:ref:`FogMode<enum_Environment_FogMode>` **FOG_MODE_EXPONENTIAL** = ``0``
使用主要由雾密度定义的基于物理的雾模型。
.. _class_Environment_constant_FOG_MODE_DEPTH:
.. rst-class:: classref-enumeration-constant
:ref:`FogMode<enum_Environment_FogMode>` **FOG_MODE_DEPTH** = ``1``
使用由开始位置和结束位置以及自定义曲线定义的简单雾模型。虽然在物理上并不准确,但当你需要更多的艺术控制时,该模型可能会很有用。
.. rst-class:: classref-item-separator
----
.. _enum_Environment_SDFGIYScale:
.. rst-class:: classref-enumeration
enum **SDFGIYScale**: :ref:`🔗<enum_Environment_SDFGIYScale>`
.. _class_Environment_constant_SDFGI_Y_SCALE_50_PERCENT:
.. rst-class:: classref-enumeration-constant
:ref:`SDFGIYScale<enum_Environment_SDFGIYScale>` **SDFGI_Y_SCALE_50_PERCENT** = ``0``
在 Y垂直轴上对 SDFGI 使用 50% 的缩放。SDFGI 单元格将比它们的宽度短两倍。这允许提供更多的 GI 细节,并减少薄地板和天花板的漏光。这通常是垂直度不高的场景的最佳选择。
.. _class_Environment_constant_SDFGI_Y_SCALE_75_PERCENT:
.. rst-class:: classref-enumeration-constant
:ref:`SDFGIYScale<enum_Environment_SDFGIYScale>` **SDFGI_Y_SCALE_75_PERCENT** = ``1``
在 Y垂直轴上为 SDFGI 使用 75% 的缩放。这是 50% 和 100% SDFGI Y 缩放之间的平衡。
.. _class_Environment_constant_SDFGI_Y_SCALE_100_PERCENT:
.. rst-class:: classref-enumeration-constant
:ref:`SDFGIYScale<enum_Environment_SDFGIYScale>` **SDFGI_Y_SCALE_100_PERCENT** = ``2``
在 Y垂直轴上为 SDFGI 使用 100% 的缩放。SDFGI 单元格将与宽度一样高。这通常是高度垂直场景的最佳选择。不利之处在于,薄地板和天花板可能会导致漏光更加明显。
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
属性说明
--------
.. _class_Environment_property_adjustment_brightness:
.. rst-class:: classref-property
:ref:`float<class_float>` **adjustment_brightness** = ``1.0`` :ref:`🔗<class_Environment_property_adjustment_brightness>`
.. rst-class:: classref-property-setget
- |void| **set_adjustment_brightness**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_adjustment_brightness**\ (\ )
Applies a simple brightness adjustment to the rendered image after tonemaping. To adjust scene brightness use :ref:`tonemap_exposure<class_Environment_property_tonemap_exposure>` instead, which is applied before tonemapping and thus less prone to issues with bright colors. Effective only if :ref:`adjustment_enabled<class_Environment_property_adjustment_enabled>` is ``true``.
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_adjustment_color_correction:
.. rst-class:: classref-property
:ref:`Texture<class_Texture>` **adjustment_color_correction** :ref:`🔗<class_Environment_property_adjustment_color_correction>`
.. rst-class:: classref-property-setget
- |void| **set_adjustment_color_correction**\ (\ value\: :ref:`Texture<class_Texture>`\ )
- :ref:`Texture<class_Texture>` **get_adjustment_color_correction**\ (\ )
用于内置后处理颜色分级的 :ref:`Texture2D<class_Texture2D>`:ref:`Texture3D<class_Texture3D>` 查找表LUT。可以将 :ref:`GradientTexture1D<class_GradientTexture1D>` 用于一维 LUT或将 :ref:`Texture3D<class_Texture3D>` 用于更复杂的 LUT。仅当 :ref:`adjustment_enabled<class_Environment_property_adjustment_enabled>```true`` 时有效。
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_adjustment_contrast:
.. rst-class:: classref-property
:ref:`float<class_float>` **adjustment_contrast** = ``1.0`` :ref:`🔗<class_Environment_property_adjustment_contrast>`
.. rst-class:: classref-property-setget
- |void| **set_adjustment_contrast**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_adjustment_contrast**\ (\ )
Increasing :ref:`adjustment_contrast<class_Environment_property_adjustment_contrast>` will make dark values darker and bright values brighter. This simple adjustment is applied to the rendered image after tonemaping. When set to a value greater than ``1.0``, :ref:`adjustment_contrast<class_Environment_property_adjustment_contrast>` is prone to clipping colors that become too bright or too dark. Effective only if :ref:`adjustment_enabled<class_Environment_property_adjustment_enabled>` is ``true``.
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_adjustment_enabled:
.. rst-class:: classref-property
:ref:`bool<class_bool>` **adjustment_enabled** = ``false`` :ref:`🔗<class_Environment_property_adjustment_enabled>`
.. rst-class:: classref-property-setget
- |void| **set_adjustment_enabled**\ (\ value\: :ref:`bool<class_bool>`\ )
- :ref:`bool<class_bool>` **is_adjustment_enabled**\ (\ )
如果为 ``true``\ ,则启用该资源提供的 ``adjustment_*`` 属性。如果为 ``false``\ ,则对 ``adjustment_*`` 属性的修改将不会对渲染场景产生影响。
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_adjustment_saturation:
.. rst-class:: classref-property
:ref:`float<class_float>` **adjustment_saturation** = ``1.0`` :ref:`🔗<class_Environment_property_adjustment_saturation>`
.. rst-class:: classref-property-setget
- |void| **set_adjustment_saturation**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_adjustment_saturation**\ (\ )
Applies a simple saturation adjustment to the rendered image after tonemaping. When :ref:`adjustment_saturation<class_Environment_property_adjustment_saturation>` is set to ``0.0``, the rendered image will be fully converted to a grayscale image. Effective only if :ref:`adjustment_enabled<class_Environment_property_adjustment_enabled>` is ``true``.
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_ambient_light_color:
.. rst-class:: classref-property
:ref:`Color<class_Color>` **ambient_light_color** = ``Color(0, 0, 0, 1)`` :ref:`🔗<class_Environment_property_ambient_light_color>`
.. rst-class:: classref-property-setget
- |void| **set_ambient_light_color**\ (\ value\: :ref:`Color<class_Color>`\ )
- :ref:`Color<class_Color>` **get_ambient_light_color**\ (\ )
环境光的 :ref:`Color<class_Color>`\ 。仅当 :ref:`ambient_light_sky_contribution<class_Environment_property_ambient_light_sky_contribution>` 低于 ``1.0``\ (不包括)时,才有效。
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_ambient_light_energy:
.. rst-class:: classref-property
:ref:`float<class_float>` **ambient_light_energy** = ``1.0`` :ref:`🔗<class_Environment_property_ambient_light_energy>`
.. rst-class:: classref-property-setget
- |void| **set_ambient_light_energy**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_ambient_light_energy**\ (\ )
环境光的能量。值越高,光线越强。仅当 :ref:`ambient_light_sky_contribution<class_Environment_property_ambient_light_sky_contribution>` 低于 ``1.0``\ (不包括)时,才有效。
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_ambient_light_sky_contribution:
.. rst-class:: classref-property
:ref:`float<class_float>` **ambient_light_sky_contribution** = ``1.0`` :ref:`🔗<class_Environment_property_ambient_light_sky_contribution>`
.. rst-class:: classref-property-setget
- |void| **set_ambient_light_sky_contribution**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_ambient_light_sky_contribution**\ (\ )
定义天空给场景带来的光照量。值为 ``0.0`` 表示天空的发光对场景照明没有影响,因此所有的环境照明都由环境光提供。相反,值为 ``1.0`` 表示\ *所有*\ 影响场景的光线都由天空提供,因此环境光参数对场景没有影响。
\ **注意:**\ 内部会将 :ref:`ambient_light_sky_contribution<class_Environment_property_ambient_light_sky_contribution>` 限制在 ``0.0````1.0`` 之间(闭区间)。
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_ambient_light_source:
.. rst-class:: classref-property
:ref:`AmbientSource<enum_Environment_AmbientSource>` **ambient_light_source** = ``0`` :ref:`🔗<class_Environment_property_ambient_light_source>`
.. rst-class:: classref-property-setget
- |void| **set_ambient_source**\ (\ value\: :ref:`AmbientSource<enum_Environment_AmbientSource>`\ )
- :ref:`AmbientSource<enum_Environment_AmbientSource>` **get_ambient_source**\ (\ )
环境光源,用于渲染材质和全局照明。
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_background_camera_feed_id:
.. rst-class:: classref-property
:ref:`int<class_int>` **background_camera_feed_id** = ``1`` :ref:`🔗<class_Environment_property_background_camera_feed_id>`
.. rst-class:: classref-property-setget
- |void| **set_camera_feed_id**\ (\ value\: :ref:`int<class_int>`\ )
- :ref:`int<class_int>` **get_camera_feed_id**\ (\ )
在背景中显示的相机源的 ID。
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_background_canvas_max_layer:
.. rst-class:: classref-property
:ref:`int<class_int>` **background_canvas_max_layer** = ``0`` :ref:`🔗<class_Environment_property_background_canvas_max_layer>`
.. rst-class:: classref-property-setget
- |void| **set_canvas_max_layer**\ (\ value\: :ref:`int<class_int>`\ )
- :ref:`int<class_int>` **get_canvas_max_layer**\ (\ )
要显示的最大图层 ID。只有在使用 :ref:`BG_CANVAS<class_Environment_constant_BG_CANVAS>` 背景模式时有效。
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_background_color:
.. rst-class:: classref-property
:ref:`Color<class_Color>` **background_color** = ``Color(0, 0, 0, 1)`` :ref:`🔗<class_Environment_property_background_color>`
.. rst-class:: classref-property-setget
- |void| **set_bg_color**\ (\ value\: :ref:`Color<class_Color>`\ )
- :ref:`Color<class_Color>` **get_bg_color**\ (\ )
场景中清除区域显示的 :ref:`Color<class_Color>`\ 。仅在使用 :ref:`BG_COLOR<class_Environment_constant_BG_COLOR>` 背景模式时有效。
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_background_energy_multiplier:
.. rst-class:: classref-property
:ref:`float<class_float>` **background_energy_multiplier** = ``1.0`` :ref:`🔗<class_Environment_property_background_energy_multiplier>`
.. rst-class:: classref-property-setget
- |void| **set_bg_energy_multiplier**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_bg_energy_multiplier**\ (\ )
背景能量的倍数。增加可以使背景更亮,减少可以使背景更暗。
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_background_intensity:
.. rst-class:: classref-property
:ref:`float<class_float>` **background_intensity** = ``30000.0`` :ref:`🔗<class_Environment_property_background_intensity>`
.. rst-class:: classref-property-setget
- |void| **set_bg_intensity**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_bg_intensity**\ (\ )
背景的亮度,单位是尼特(坎德拉/平方米)。仅当启用 :ref:`ProjectSettings.rendering/lights_and_shadows/use_physical_light_units<class_ProjectSettings_property_rendering/lights_and_shadows/use_physical_light_units>` 时使用。默认值大致相当于正午时分的天空。
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_background_mode:
.. rst-class:: classref-property
:ref:`BGMode<enum_Environment_BGMode>` **background_mode** = ``0`` :ref:`🔗<class_Environment_property_background_mode>`
.. rst-class:: classref-property-setget
- |void| **set_background**\ (\ value\: :ref:`BGMode<enum_Environment_BGMode>`\ )
- :ref:`BGMode<enum_Environment_BGMode>` **get_background**\ (\ )
背景的模式。
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_fog_aerial_perspective:
.. rst-class:: classref-property
:ref:`float<class_float>` **fog_aerial_perspective** = ``0.0`` :ref:`🔗<class_Environment_property_fog_aerial_perspective>`
.. rst-class:: classref-property-setget
- |void| **set_fog_aerial_perspective**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_fog_aerial_perspective**\ (\ )
如果设置为大于 ``0.0``\ (不含),会在雾的颜色和背景 :ref:`Sky<class_Sky>` 辐射率立方体贴图中的颜色之间进行混合。设置为大于 ``0.0`` 时有较小的性能代价。必须将 :ref:`background_mode<class_Environment_property_background_mode>` 设置为 :ref:`BG_SKY<class_Environment_constant_BG_SKY>`\ 。
对于模拟雾密度较低的大场景中的\ `空气透视 <https://zh.wikipedia.org/wiki/%E7%A9%BA%E6%B0%94%E9%80%8F%E8%A7%86>`__\ 很有用。但对于高密度的雾来说不是很有用,因为天空会被照亮。设置为 ``1.0`` 时,雾的颜色完全来自 :ref:`Sky<class_Sky>`\ 。设置为 ``0.0`` 时,会禁用空气透视。
请注意这里采样的是辐射率立方体贴图而不是对 :ref:`Sky<class_Sky>` 直接采样。立方体贴图采样时使用 mipmap层级由所渲染像素的深度决定距离越远用于采样的 mipmap 的分辨率越高。这会导致实际颜色呈现为天空的模糊版本,离相机越近模糊程度越高。在深度为 :ref:`Camera3D.far<class_Camera3D_property_far>` 时使用的是最高的 mipmap 分辨率。
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_fog_density:
.. rst-class:: classref-property
:ref:`float<class_float>` **fog_density** = ``0.01`` :ref:`🔗<class_Environment_property_fog_density>`
.. rst-class:: classref-property-setget
- |void| **set_fog_density**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_fog_density**\ (\ )
要使用的雾密度。根据所选的 :ref:`fog_mode<class_Environment_property_fog_mode>` 模式,可以通过不同的方式进行演示:
\ **指数雾模式:**\ 数值越高,雾就越浓。雾渲染就像现实生活中一样呈指数级增长。
\ **深度雾模式:**\ 深度雾的最大强度,效果将出现在远处(相对于相机)。在 ``1.0`` 处,雾将完全遮盖场景,在 ``0.0`` 处,雾将不可见。
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_fog_depth_begin:
.. rst-class:: classref-property
:ref:`float<class_float>` **fog_depth_begin** = ``10.0`` :ref:`🔗<class_Environment_property_fog_depth_begin>`
.. rst-class:: classref-property-setget
- |void| **set_fog_depth_begin**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_fog_depth_begin**\ (\ )
雾距相机的深度起始距离。仅当 :ref:`fog_mode<class_Environment_property_fog_mode>` 被设置为 :ref:`FOG_MODE_DEPTH<class_Environment_constant_FOG_MODE_DEPTH>` 时可用。
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_fog_depth_curve:
.. rst-class:: classref-property
:ref:`float<class_float>` **fog_depth_curve** = ``1.0`` :ref:`🔗<class_Environment_property_fog_depth_curve>`
.. rst-class:: classref-property-setget
- |void| **set_fog_depth_curve**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_fog_depth_curve**\ (\ )
雾深度的强度曲线。通过右键点击曲线,可以在检查器中使用许多预设。仅当 :ref:`fog_mode<class_Environment_property_fog_mode>` 被设置为 :ref:`FOG_MODE_DEPTH<class_Environment_constant_FOG_MODE_DEPTH>` 时可用。
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_fog_depth_end:
.. rst-class:: classref-property
:ref:`float<class_float>` **fog_depth_end** = ``100.0`` :ref:`🔗<class_Environment_property_fog_depth_end>`
.. rst-class:: classref-property-setget
- |void| **set_fog_depth_end**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_fog_depth_end**\ (\ )
雾距相机的深度结束的距离。如果该值被设置为 ``0``\ ,它将等于当前相机的 :ref:`Camera3D.far<class_Camera3D_property_far>` 值。仅当 :ref:`fog_mode<class_Environment_property_fog_mode>` 被设置为 :ref:`FOG_MODE_DEPTH<class_Environment_constant_FOG_MODE_DEPTH>` 时可用。
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_fog_enabled:
.. rst-class:: classref-property
:ref:`bool<class_bool>` **fog_enabled** = ``false`` :ref:`🔗<class_Environment_property_fog_enabled>`
.. rst-class:: classref-property-setget
- |void| **set_fog_enabled**\ (\ value\: :ref:`bool<class_bool>`\ )
- :ref:`bool<class_bool>` **is_fog_enabled**\ (\ )
如果为 ``true``\ ,则启用雾效果。
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_fog_height:
.. rst-class:: classref-property
:ref:`float<class_float>` **fog_height** = ``0.0`` :ref:`🔗<class_Environment_property_fog_height>`
.. rst-class:: classref-property-setget
- |void| **set_fog_height**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_fog_height**\ (\ )
高度雾效果开始的高度。
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_fog_height_density:
.. rst-class:: classref-property
:ref:`float<class_float>` **fog_height_density** = ``0.0`` :ref:`🔗<class_Environment_property_fog_height_density>`
.. rst-class:: classref-property-setget
- |void| **set_fog_height_density**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_fog_height_density**\ (\ )
用于随着高度降低而增加雾的密度。要使雾随着高度增加而增加,请使用负值。
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_fog_light_color:
.. rst-class:: classref-property
:ref:`Color<class_Color>` **fog_light_color** = ``Color(0.518, 0.553, 0.608, 1)`` :ref:`🔗<class_Environment_property_fog_light_color>`
.. rst-class:: classref-property-setget
- |void| **set_fog_light_color**\ (\ value\: :ref:`Color<class_Color>`\ )
- :ref:`Color<class_Color>` **get_fog_light_color**\ (\ )
雾的颜色。
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_fog_light_energy:
.. rst-class:: classref-property
:ref:`float<class_float>` **fog_light_energy** = ``1.0`` :ref:`🔗<class_Environment_property_fog_light_energy>`
.. rst-class:: classref-property-setget
- |void| **set_fog_light_energy**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_fog_light_energy**\ (\ )
雾的亮度。值越高,雾越亮。
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_fog_mode:
.. rst-class:: classref-property
:ref:`FogMode<enum_Environment_FogMode>` **fog_mode** = ``0`` :ref:`🔗<class_Environment_property_fog_mode>`
.. rst-class:: classref-property-setget
- |void| **set_fog_mode**\ (\ value\: :ref:`FogMode<enum_Environment_FogMode>`\ )
- :ref:`FogMode<enum_Environment_FogMode>` **get_fog_mode**\ (\ )
雾的模式。
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_fog_sky_affect:
.. rst-class:: classref-property
:ref:`float<class_float>` **fog_sky_affect** = ``1.0`` :ref:`🔗<class_Environment_property_fog_sky_affect>`
.. rst-class:: classref-property-setget
- |void| **set_fog_sky_affect**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_fog_sky_affect**\ (\ )
非体积雾影响天空时使用的系数。\ ``1.0`` 表示雾可以完全遮蔽天空。较低的值会减少雾对天空渲染的影响,\ ``0.0`` 完全不影响天空的渲染。
\ **注意:**\ 如果 :ref:`fog_aerial_perspective<class_Environment_property_fog_aerial_perspective>```1.0``\ \ :ref:`fog_sky_affect<class_Environment_property_fog_sky_affect>` 不会有视觉效果。
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_fog_sun_scatter:
.. rst-class:: classref-property
:ref:`float<class_float>` **fog_sun_scatter** = ``0.0`` :ref:`🔗<class_Environment_property_fog_sun_scatter>`
.. rst-class:: classref-property-setget
- |void| **set_fog_sun_scatter**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_fog_sun_scatter**\ (\ )
如果设置为 ``0.0`` 以上,则根据视角以雾色渲染场景的定向光。这可以用来给人一种太阳正在“穿透”雾的印象。
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_glow_blend_mode:
.. rst-class:: classref-property
:ref:`GlowBlendMode<enum_Environment_GlowBlendMode>` **glow_blend_mode** = ``1`` :ref:`🔗<class_Environment_property_glow_blend_mode>`
.. rst-class:: classref-property-setget
- |void| **set_glow_blend_mode**\ (\ value\: :ref:`GlowBlendMode<enum_Environment_GlowBlendMode>`\ )
- :ref:`GlowBlendMode<enum_Environment_GlowBlendMode>` **get_glow_blend_mode**\ (\ )
The glow blending mode.
\ **Note:** The Compatibility renderer always uses :ref:`GLOW_BLEND_MODE_SCREEN<class_Environment_constant_GLOW_BLEND_MODE_SCREEN>` and :ref:`glow_blend_mode<class_Environment_property_glow_blend_mode>` will have no effect.
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_glow_bloom:
.. rst-class:: classref-property
:ref:`float<class_float>` **glow_bloom** = ``0.0`` :ref:`🔗<class_Environment_property_glow_bloom>`
.. rst-class:: classref-property-setget
- |void| **set_glow_bloom**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_glow_bloom**\ (\ )
泛光的强度。如果设置为大于 ``0`` 的值,则将在比 :ref:`glow_hdr_threshold<class_Environment_property_glow_hdr_threshold>` 成员更暗的区域中显示辉光。
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_glow_enabled:
.. rst-class:: classref-property
:ref:`bool<class_bool>` **glow_enabled** = ``false`` :ref:`🔗<class_Environment_property_glow_enabled>`
.. rst-class:: classref-property-setget
- |void| **set_glow_enabled**\ (\ value\: :ref:`bool<class_bool>`\ )
- :ref:`bool<class_bool>` **is_glow_enabled**\ (\ )
If ``true``, the glow effect is enabled. This simulates real world atmosphere and eye/camera behavior by causing bright pixels to bleed onto surrounding pixels.
\ **Note:** When using the Mobile rendering method, glow looks different due to the lower dynamic range available in the Mobile rendering method.
\ **Note:** When using the Compatibility rendering method, glow uses a different implementation with some properties being unavailable and hidden from the inspector: ``glow_levels/*``, :ref:`glow_normalized<class_Environment_property_glow_normalized>`, :ref:`glow_strength<class_Environment_property_glow_strength>`, :ref:`glow_blend_mode<class_Environment_property_glow_blend_mode>`, :ref:`glow_mix<class_Environment_property_glow_mix>`, :ref:`glow_map<class_Environment_property_glow_map>`, and :ref:`glow_map_strength<class_Environment_property_glow_map_strength>`. This implementation is optimized to run on low-end devices and is less flexible as a result.
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_glow_hdr_luminance_cap:
.. rst-class:: classref-property
:ref:`float<class_float>` **glow_hdr_luminance_cap** = ``12.0`` :ref:`🔗<class_Environment_property_glow_hdr_luminance_cap>`
.. rst-class:: classref-property-setget
- |void| **set_glow_hdr_luminance_cap**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_glow_hdr_luminance_cap**\ (\ )
HDR 辉光的较高阈值。比这个阈值更亮的区域将被限制,以达到辉光效果的目的。
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_glow_hdr_scale:
.. rst-class:: classref-property
:ref:`float<class_float>` **glow_hdr_scale** = ``2.0`` :ref:`🔗<class_Environment_property_glow_hdr_scale>`
.. rst-class:: classref-property-setget
- |void| **set_glow_hdr_bleed_scale**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_glow_hdr_bleed_scale**\ (\ )
Smooths the transition between values that are below and above :ref:`glow_hdr_threshold<class_Environment_property_glow_hdr_threshold>` by reducing the amount of glow generated by values that are close to :ref:`glow_hdr_threshold<class_Environment_property_glow_hdr_threshold>`. Values above ``glow_hdr_threshold + glow_hdr_scale`` will not have glow reduced in this way.
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_glow_hdr_threshold:
.. rst-class:: classref-property
:ref:`float<class_float>` **glow_hdr_threshold** = ``1.0`` :ref:`🔗<class_Environment_property_glow_hdr_threshold>`
.. rst-class:: classref-property-setget
- |void| **set_glow_hdr_bleed_threshold**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_glow_hdr_bleed_threshold**\ (\ )
HDR 辉光的下限阈值。当使用 Mobile 渲染方法时(仅支持较低的动态范围,最大为 ``2.0``\ ),需要低于 ``1.0`` 才能看到辉光。在这种情况下取 ``0.9`` 可以达到不错的效果。在 2D 中使用辉光时也需要降低到 ``1.0`` 以下,因为 2D 渲染使用 SDR。
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_glow_intensity:
.. rst-class:: classref-property
:ref:`float<class_float>` **glow_intensity** = ``0.3`` :ref:`🔗<class_Environment_property_glow_intensity>`
.. rst-class:: classref-property-setget
- |void| **set_glow_intensity**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_glow_intensity**\ (\ )
The overall brightness multiplier that is applied to the glow effect just before it is blended with the scene. 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.
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_glow_levels/1:
.. rst-class:: classref-property
:ref:`float<class_float>` **glow_levels/1** = ``0.0`` :ref:`🔗<class_Environment_property_glow_levels/1>`
.. rst-class:: classref-property-setget
- |void| **set_glow_level**\ (\ idx\: :ref:`int<class_int>`, intensity\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_glow_level**\ (\ idx\: :ref:`int<class_int>`\ ) |const|
第一层辉光的强度。这是最“局部”的层级(最不模糊)。
\ **注意:**\ :ref:`glow_levels/1<class_Environment_property_glow_levels/1>` 在使用兼容性渲染方法时没有效果,因为这种渲染方法使用针对低端设备优化的更简单的辉光实现。
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_glow_levels/2:
.. rst-class:: classref-property
:ref:`float<class_float>` **glow_levels/2** = ``0.8`` :ref:`🔗<class_Environment_property_glow_levels/2>`
.. rst-class:: classref-property-setget
- |void| **set_glow_level**\ (\ idx\: :ref:`int<class_int>`, intensity\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_glow_level**\ (\ idx\: :ref:`int<class_int>`\ ) |const|
第二层辉光的强度。
\ **注意:**\ :ref:`glow_levels/2<class_Environment_property_glow_levels/2>` 在使用兼容性渲染方法时没有效果,因为这种渲染方法使用针对低端设备优化的更简单的辉光实现。
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_glow_levels/3:
.. rst-class:: classref-property
:ref:`float<class_float>` **glow_levels/3** = ``0.4`` :ref:`🔗<class_Environment_property_glow_levels/3>`
.. rst-class:: classref-property-setget
- |void| **set_glow_level**\ (\ idx\: :ref:`int<class_int>`, intensity\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_glow_level**\ (\ idx\: :ref:`int<class_int>`\ ) |const|
第三层辉光的强度。
\ **注意:**\ :ref:`glow_levels/3<class_Environment_property_glow_levels/3>` 在使用兼容性渲染方法时没有效果,因为这种渲染方法使用针对低端设备优化的更简单的辉光实现。
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_glow_levels/4:
.. rst-class:: classref-property
:ref:`float<class_float>` **glow_levels/4** = ``0.1`` :ref:`🔗<class_Environment_property_glow_levels/4>`
.. rst-class:: classref-property-setget
- |void| **set_glow_level**\ (\ idx\: :ref:`int<class_int>`, intensity\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_glow_level**\ (\ idx\: :ref:`int<class_int>`\ ) |const|
第四层辉光的强度。
\ **注意:**\ :ref:`glow_levels/4<class_Environment_property_glow_levels/4>` 在使用兼容性渲染方法时没有效果,因为这种渲染方法使用针对低端设备优化的更简单的辉光实现。
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_glow_levels/5:
.. rst-class:: classref-property
:ref:`float<class_float>` **glow_levels/5** = ``0.0`` :ref:`🔗<class_Environment_property_glow_levels/5>`
.. rst-class:: classref-property-setget
- |void| **set_glow_level**\ (\ idx\: :ref:`int<class_int>`, intensity\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_glow_level**\ (\ idx\: :ref:`int<class_int>`\ ) |const|
第五层辉光的强度。
\ **注意:**\ :ref:`glow_levels/5<class_Environment_property_glow_levels/5>` 在使用兼容性渲染方法时没有效果,因为这种渲染方法使用针对低端设备优化的更简单的辉光实现。
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_glow_levels/6:
.. rst-class:: classref-property
:ref:`float<class_float>` **glow_levels/6** = ``0.0`` :ref:`🔗<class_Environment_property_glow_levels/6>`
.. rst-class:: classref-property-setget
- |void| **set_glow_level**\ (\ idx\: :ref:`int<class_int>`, intensity\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_glow_level**\ (\ idx\: :ref:`int<class_int>`\ ) |const|
第六层辉光的强度。
\ **注意:**\ :ref:`glow_levels/6<class_Environment_property_glow_levels/6>` 在使用兼容性渲染方法时没有效果,因为这种渲染方法使用针对低端设备优化的更简单的辉光实现。
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_glow_levels/7:
.. rst-class:: classref-property
:ref:`float<class_float>` **glow_levels/7** = ``0.0`` :ref:`🔗<class_Environment_property_glow_levels/7>`
.. rst-class:: classref-property-setget
- |void| **set_glow_level**\ (\ idx\: :ref:`int<class_int>`, intensity\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_glow_level**\ (\ idx\: :ref:`int<class_int>`\ ) |const|
第七层辉光的强度。这是最“全局”的层级(最模糊)。
\ **注意:**\ :ref:`glow_levels/7<class_Environment_property_glow_levels/7>` 在使用兼容性渲染方法时没有效果,因为这种渲染方法使用针对低端设备优化的更简单的辉光实现。
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_glow_map:
.. rst-class:: classref-property
:ref:`Texture<class_Texture>` **glow_map** :ref:`🔗<class_Environment_property_glow_map>`
.. rst-class:: classref-property-setget
- |void| **set_glow_map**\ (\ value\: :ref:`Texture<class_Texture>`\ )
- :ref:`Texture<class_Texture>` **get_glow_map**\ (\ )
该纹理应被用作一个辉光贴图,以根据 :ref:`glow_map_strength<class_Environment_property_glow_map_strength>` *乘以* 生成的辉光颜色。这可以用来创建一个“镜头污垢”效果。该纹理的 RGB 颜色通道被用于调制,但 Alpha 通道将被忽略。
\ **注意:**\ 该纹理将被拉伸以适应屏幕。因此,建议使用长宽比与项目的基本长宽比(通常为 16:9相匹配的纹理。
\ **注意:**\ :ref:`glow_map<class_Environment_property_glow_map>` 在使用兼容性渲染方法时没有效果,因为该渲染方法使用针对低端设备优化的更简单的辉光实现。
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_glow_map_strength:
.. rst-class:: classref-property
:ref:`float<class_float>` **glow_map_strength** = ``0.8`` :ref:`🔗<class_Environment_property_glow_map_strength>`
.. rst-class:: classref-property-setget
- |void| **set_glow_map_strength**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_glow_map_strength**\ (\ )
:ref:`glow_map<class_Environment_property_glow_map>` 应该对整体辉光效果产生多大的影响。强度为 ``0.0`` 表示辉光贴图不产生任何影响。强度为 ``1.0`` 表示辉光贴图发挥完全影响。
\ **注意:**\ 如果辉光贴图有黑色区域,强度为 ``1.0`` 可以在屏幕的特定区域完全关闭辉光。
\ **注意:**\ :ref:`glow_map_strength<class_Environment_property_glow_map_strength>` 在使用 Compatibility 渲染方法时没有效果,因为该渲染方法使用针对低端设备优化的更简单的辉光实现。
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_glow_mix:
.. rst-class:: classref-property
:ref:`float<class_float>` **glow_mix** = ``0.05`` :ref:`🔗<class_Environment_property_glow_mix>`
.. rst-class:: classref-property-setget
- |void| **set_glow_mix**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_glow_mix**\ (\ )
当使用 :ref:`GLOW_BLEND_MODE_MIX<class_Environment_constant_GLOW_BLEND_MODE_MIX>` :ref:`glow_blend_mode<class_Environment_property_glow_blend_mode>` 时,它控制源图像与辉光层混合的程度。\ ``0.0`` 的值使辉光渲染不可见,而 ``1.0`` 的值等效于 :ref:`GLOW_BLEND_MODE_REPLACE<class_Environment_constant_GLOW_BLEND_MODE_REPLACE>`\ 。
\ **注意:**\ :ref:`glow_mix<class_Environment_property_glow_mix>` 在使用兼容性渲染方法时没有效果,因为该渲染方法使用针对低端设备优化的更简单的辉光实现。
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_glow_normalized:
.. rst-class:: classref-property
:ref:`bool<class_bool>` **glow_normalized** = ``false`` :ref:`🔗<class_Environment_property_glow_normalized>`
.. rst-class:: classref-property-setget
- |void| **set_glow_normalized**\ (\ value\: :ref:`bool<class_bool>`\ )
- :ref:`bool<class_bool>` **is_glow_normalized**\ (\ )
如果为 ``true``\ ,则辉光层级将被归一化,以便它们的强度总和等于 ``1.0``\ 。
\ **注意:**\ :ref:`glow_normalized<class_Environment_property_glow_normalized>` 在使用兼容性渲染方法时没有效果,因为这种渲染方法使用针对低端设备优化的更简单的辉光实现。
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_glow_strength:
.. rst-class:: classref-property
:ref:`float<class_float>` **glow_strength** = ``1.0`` :ref:`🔗<class_Environment_property_glow_strength>`
.. rst-class:: classref-property-setget
- |void| **set_glow_strength**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_glow_strength**\ (\ )
The strength that is used when blurring across the screen to generate the glow effect. This affects the distance and intensity of the blur. When using the Mobile rendering method, this should be increased to compensate for the lower dynamic range.
\ **Note:** :ref:`glow_strength<class_Environment_property_glow_strength>` has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices.
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_reflected_light_source:
.. rst-class:: classref-property
:ref:`ReflectionSource<enum_Environment_ReflectionSource>` **reflected_light_source** = ``0`` :ref:`🔗<class_Environment_property_reflected_light_source>`
.. rst-class:: classref-property-setget
- |void| **set_reflection_source**\ (\ value\: :ref:`ReflectionSource<enum_Environment_ReflectionSource>`\ )
- :ref:`ReflectionSource<enum_Environment_ReflectionSource>` **get_reflection_source**\ (\ )
反射(镜面反射)光源。
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_sdfgi_bounce_feedback:
.. rst-class:: classref-property
:ref:`float<class_float>` **sdfgi_bounce_feedback** = ``0.5`` :ref:`🔗<class_Environment_property_sdfgi_bounce_feedback>`
.. rst-class:: classref-property-setget
- |void| **set_sdfgi_bounce_feedback**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_sdfgi_bounce_feedback**\ (\ )
使用 SDFGI 时,每次从表面反弹时应用于光的能量倍增器。大于 ``0.0`` 的值将模拟多次反弹,从而产生更逼真的外观。增加 :ref:`sdfgi_bounce_feedback<class_Environment_property_sdfgi_bounce_feedback>` 通常对性能没有影响。另见 :ref:`sdfgi_energy<class_Environment_property_sdfgi_energy>`\ 。
\ **注意:**\ 大于 ``0.5`` 的值会导致无限的反馈循环,应避免在具有明亮材质的场景中使用。
\ **注意:**\ 如果 :ref:`sdfgi_bounce_feedback<class_Environment_property_sdfgi_bounce_feedback>```0.0``\ ,间接照明会在反射中表现出来,因为光只会反弹一次。
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_sdfgi_cascade0_distance:
.. rst-class:: classref-property
:ref:`float<class_float>` **sdfgi_cascade0_distance** = ``12.8`` :ref:`🔗<class_Environment_property_sdfgi_cascade0_distance>`
.. rst-class:: classref-property-setget
- |void| **set_sdfgi_cascade0_distance**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_sdfgi_cascade0_distance**\ (\ )
**注意:**\ 该属性被链接到 :ref:`sdfgi_min_cell_size<class_Environment_property_sdfgi_min_cell_size>`:ref:`sdfgi_max_distance<class_Environment_property_sdfgi_max_distance>`\ 。更改其值也会自动更改这些属性。
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_sdfgi_cascades:
.. rst-class:: classref-property
:ref:`int<class_int>` **sdfgi_cascades** = ``4`` :ref:`🔗<class_Environment_property_sdfgi_cascades>`
.. rst-class:: classref-property-setget
- |void| **set_sdfgi_cascades**\ (\ value\: :ref:`int<class_int>`\ )
- :ref:`int<class_int>` **get_sdfgi_cascades**\ (\ )
用于 SDFGI 的级联数1 到 8 之间)。更高的级联数会以性能为代价,允许在更远的地方显示 SDFGI同时保持近距离的细节。在小型关卡上使用 SDFGI 时,通常 :ref:`sdfgi_cascades<class_Environment_property_sdfgi_cascades>` 可以被降低到 ``1````4`` 之间以提高性能。
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_sdfgi_enabled:
.. rst-class:: classref-property
:ref:`bool<class_bool>` **sdfgi_enabled** = ``false`` :ref:`🔗<class_Environment_property_sdfgi_enabled>`
.. rst-class:: classref-property-setget
- |void| **set_sdfgi_enabled**\ (\ value\: :ref:`bool<class_bool>`\ )
- :ref:`bool<class_bool>` **is_sdfgi_enabled**\ (\ )
如果为 ``true``\ ,则为将 :ref:`GeometryInstance3D.gi_mode<class_GeometryInstance3D_property_gi_mode>` 设置为 :ref:`GeometryInstance3D.GI_MODE_STATIC<class_GeometryInstance3D_constant_GI_MODE_STATIC>` 的网格,启用有符号距离场全局照明(即 SDFGI。SDFGI 是一种实时全局照明技术,适用于程序生成和用户构建的关卡,包括在游戏过程中创建几何体的情况。有符号距离场会在相机移动时自动围绕相机生成。支持动态光,但不支持动态遮挡物和自发光表面。
\ **注意:**\ SDFGI 只支持 Forward+ 渲染方式,不支持 Mobile 或 Compatibility。
\ **性能:**\ SDFGI 对 GPU 的要求比较高,不适合集成显卡等低端硬件(可以考虑 :ref:`LightmapGI<class_LightmapGI>`\ )。要提高 SDFGI 性能,请在项目设置中启用 :ref:`ProjectSettings.rendering/global_illumination/gi/use_half_resolution<class_ProjectSettings_property_rendering/global_illumination/gi/use_half_resolution>`\ 。
\ **注意:**\ 网格应该有足够厚的壁以避免漏光(避免单面壁)。对于内部关卡,将关卡几何体放入一个足够大的盒子中,并桥接循环边以闭合网格。
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_sdfgi_energy:
.. rst-class:: classref-property
:ref:`float<class_float>` **sdfgi_energy** = ``1.0`` :ref:`🔗<class_Environment_property_sdfgi_energy>`
.. rst-class:: classref-property-setget
- |void| **set_sdfgi_energy**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_sdfgi_energy**\ (\ )
用于 SDFGI 的能量乘数。较高的值将导致更亮的间接照明和反射。另见 :ref:`sdfgi_bounce_feedback<class_Environment_property_sdfgi_bounce_feedback>`\ 。
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_sdfgi_max_distance:
.. rst-class:: classref-property
:ref:`float<class_float>` **sdfgi_max_distance** = ``204.8`` :ref:`🔗<class_Environment_property_sdfgi_max_distance>`
.. rst-class:: classref-property-setget
- |void| **set_sdfgi_max_distance**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_sdfgi_max_distance**\ (\ )
SDFGI 可见的最大距离。超出该距离,环境照明或其他 GI 来源(例如 :ref:`ReflectionProbe<class_ReflectionProbe>`\ )将用作后备。
\ **注意:**\ 该属性被链接到 :ref:`sdfgi_min_cell_size<class_Environment_property_sdfgi_min_cell_size>`:ref:`sdfgi_cascade0_distance<class_Environment_property_sdfgi_cascade0_distance>`\ 。更改其值,也会自动更改这些属性。
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_sdfgi_min_cell_size:
.. rst-class:: classref-property
:ref:`float<class_float>` **sdfgi_min_cell_size** = ``0.2`` :ref:`🔗<class_Environment_property_sdfgi_min_cell_size>`
.. rst-class:: classref-property-setget
- |void| **set_sdfgi_min_cell_size**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_sdfgi_min_cell_size**\ (\ )
用于最接近的 SDFGI 级联的像元大小(以 3D 单位表示)。较低的值允许 SDFGI 近距离更精确,但代价是 SDFGI 更新要求更高。当相机快速移动时,这可能会导致卡顿。较高的值允许 SDFGI 覆盖更多的范围,同时也降低了 SDFGI 更新对性能的影响。
\ **注意:**\ 该属性被链接到 :ref:`sdfgi_max_distance<class_Environment_property_sdfgi_max_distance>`:ref:`sdfgi_cascade0_distance<class_Environment_property_sdfgi_cascade0_distance>`\ 。更改其值也会自动更改这些属性。
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_sdfgi_normal_bias:
.. rst-class:: classref-property
:ref:`float<class_float>` **sdfgi_normal_bias** = ``1.1`` :ref:`🔗<class_Environment_property_sdfgi_normal_bias>`
.. rst-class:: classref-property-setget
- |void| **set_sdfgi_normal_bias**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_sdfgi_normal_bias**\ (\ )
用于 SDFGI 探针的正常偏差。增加此值可以减少倾斜表面上的可见条纹伪影,但会增加漏光。
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_sdfgi_probe_bias:
.. rst-class:: classref-property
:ref:`float<class_float>` **sdfgi_probe_bias** = ``1.1`` :ref:`🔗<class_Environment_property_sdfgi_probe_bias>`
.. rst-class:: classref-property-setget
- |void| **set_sdfgi_probe_bias**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_sdfgi_probe_bias**\ (\ )
用于 SDFGI 探针的恒定偏差。增加此值可以减少倾斜表面上的可见条纹伪影,但会增加漏光。
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_sdfgi_read_sky_light:
.. rst-class:: classref-property
:ref:`bool<class_bool>` **sdfgi_read_sky_light** = ``true`` :ref:`🔗<class_Environment_property_sdfgi_read_sky_light>`
.. rst-class:: classref-property-setget
- |void| **set_sdfgi_read_sky_light**\ (\ value\: :ref:`bool<class_bool>`\ )
- :ref:`bool<class_bool>` **is_sdfgi_reading_sky_light**\ (\ )
如果为 ``true``\ ,则 SDFGI 会考虑环境光照。对于室内场景,这应该被设置为 ``false``\ 。
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_sdfgi_use_occlusion:
.. rst-class:: classref-property
:ref:`bool<class_bool>` **sdfgi_use_occlusion** = ``false`` :ref:`🔗<class_Environment_property_sdfgi_use_occlusion>`
.. rst-class:: classref-property-setget
- |void| **set_sdfgi_use_occlusion**\ (\ value\: :ref:`bool<class_bool>`\ )
- :ref:`bool<class_bool>` **is_sdfgi_using_occlusion**\ (\ )
如果为 ``true``\ SDFGI 使用遮挡检测方法来减少漏光。然而,遮挡可能会在某些位置引入暗斑,这在大多数户外场景中可能是不希望的。\ :ref:`sdfgi_use_occlusion<class_Environment_property_sdfgi_use_occlusion>` 对性能有影响,只应在需要时启用。
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_sdfgi_y_scale:
.. rst-class:: classref-property
:ref:`SDFGIYScale<enum_Environment_SDFGIYScale>` **sdfgi_y_scale** = ``1`` :ref:`🔗<class_Environment_property_sdfgi_y_scale>`
.. rst-class:: classref-property-setget
- |void| **set_sdfgi_y_scale**\ (\ value\: :ref:`SDFGIYScale<enum_Environment_SDFGIYScale>`\ )
- :ref:`SDFGIYScale<enum_Environment_SDFGIYScale>` **get_sdfgi_y_scale**\ (\ )
用于 SDFGI 单元格的 Y 缩放。较低的值将导致 SDFGI 单元格在 Y 轴上更紧密地堆积在一起。这用于在质量和覆盖大量垂直地面之间取得平衡。\ :ref:`sdfgi_y_scale<class_Environment_property_sdfgi_y_scale>` 应该根据场景的垂直程度(以及相机在 Y 轴上移动的速度)来设置。
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_sky:
.. rst-class:: classref-property
:ref:`Sky<class_Sky>` **sky** :ref:`🔗<class_Environment_property_sky>`
.. rst-class:: classref-property-setget
- |void| **set_sky**\ (\ value\: :ref:`Sky<class_Sky>`\ )
- :ref:`Sky<class_Sky>` **get_sky**\ (\ )
**Environment** 所使用的 :ref:`Sky<class_Sky>` 资源。
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_sky_custom_fov:
.. rst-class:: classref-property
:ref:`float<class_float>` **sky_custom_fov** = ``0.0`` :ref:`🔗<class_Environment_property_sky_custom_fov>`
.. rst-class:: classref-property-setget
- |void| **set_sky_custom_fov**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_sky_custom_fov**\ (\ )
如果被设置为大于 ``0.0`` 的值,则会覆盖用于天空渲染的视野。如果被设置为 ``0.0``\ ,则使用与当前 :ref:`Camera3D<class_Camera3D>` 相同的 FOV 进行天空渲染。
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_sky_rotation:
.. rst-class:: classref-property
:ref:`Vector3<class_Vector3>` **sky_rotation** = ``Vector3(0, 0, 0)`` :ref:`🔗<class_Environment_property_sky_rotation>`
.. rst-class:: classref-property-setget
- |void| **set_sky_rotation**\ (\ value\: :ref:`Vector3<class_Vector3>`\ )
- :ref:`Vector3<class_Vector3>` **get_sky_rotation**\ (\ )
用于天空渲染的旋转。
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_ssao_ao_channel_affect:
.. rst-class:: classref-property
:ref:`float<class_float>` **ssao_ao_channel_affect** = ``0.0`` :ref:`🔗<class_Environment_property_ssao_ao_channel_affect>`
.. rst-class:: classref-property-setget
- |void| **set_ssao_ao_channel_affect**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_ssao_ao_channel_affect**\ (\ )
定义了AO纹理的材质的屏幕空间环境遮挡强度。高于\ ``0``\ 的值将使SSAO效果在AO纹理变暗的区域可见。
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_ssao_detail:
.. rst-class:: classref-property
:ref:`float<class_float>` **ssao_detail** = ``0.5`` :ref:`🔗<class_Environment_property_ssao_detail>`
.. rst-class:: classref-property-setget
- |void| **set_ssao_detail**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_ssao_detail**\ (\ )
设置屏幕空间环境遮蔽效果的附加细节级别的强度。高的值会使细节传递更加突出,但它可能会导致最终图像中出现锯齿。
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_ssao_enabled:
.. rst-class:: classref-property
:ref:`bool<class_bool>` **ssao_enabled** = ``false`` :ref:`🔗<class_Environment_property_ssao_enabled>`
.. rst-class:: classref-property-setget
- |void| **set_ssao_enabled**\ (\ value\: :ref:`bool<class_bool>`\ )
- :ref:`bool<class_bool>` **is_ssao_enabled**\ (\ )
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.
\ **Note:** SSAO is only supported in the Forward+ and Compatibility rendering methods, not Mobile.
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_ssao_horizon:
.. rst-class:: classref-property
:ref:`float<class_float>` **ssao_horizon** = ``0.06`` :ref:`🔗<class_Environment_property_ssao_horizon>`
.. rst-class:: classref-property-setget
- |void| **set_ssao_horizon**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_ssao_horizon**\ (\ )
用于考虑表面上给定点是否被遮挡的阈值,表示为与地平线的角度,映射到 ``0.0-1.0`` 范围。\ ``1.0`` 的值不会导致遮蔽。
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_ssao_intensity:
.. rst-class:: classref-property
:ref:`float<class_float>` **ssao_intensity** = ``2.0`` :ref:`🔗<class_Environment_property_ssao_intensity>`
.. rst-class:: classref-property-setget
- |void| **set_ssao_intensity**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_ssao_intensity**\ (\ )
主要屏幕空间的环境光遮蔽强度。用作屏幕空间环境光遮蔽效果的乘数。较高的值会导致较暗的遮蔽。
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_ssao_light_affect:
.. rst-class:: classref-property
:ref:`float<class_float>` **ssao_light_affect** = ``0.0`` :ref:`🔗<class_Environment_property_ssao_light_affect>`
.. rst-class:: classref-property-setget
- |void| **set_ssao_direct_light_affect**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_ssao_direct_light_affect**\ (\ )
直射光下的屏幕空间环境光遮蔽强度。在现实生活中,环境遮挡只适用于间接光,也就是说在直射光下无法看到其效果。高于\ ``0``\ 的数值将使SSAO效果在直射光下可见。
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_ssao_power:
.. rst-class:: classref-property
:ref:`float<class_float>` **ssao_power** = ``1.5`` :ref:`🔗<class_Environment_property_ssao_power>`
.. rst-class:: classref-property-setget
- |void| **set_ssao_power**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_ssao_power**\ (\ )
光遮蔽的分布。更高的值会导致更暗的光遮蔽,类似于 :ref:`ssao_intensity<class_Environment_property_ssao_intensity>`\ ,但衰减更剧烈。
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_ssao_radius:
.. rst-class:: classref-property
:ref:`float<class_float>` **ssao_radius** = ``1.0`` :ref:`🔗<class_Environment_property_ssao_radius>`
.. rst-class:: classref-property-setget
- |void| **set_ssao_radius**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_ssao_radius**\ (\ )
计算屏幕空间环境光遮蔽时,对象可以相互遮蔽的距离。较高的值将导致以性能和质量为代价的更远距离的光遮蔽。
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_ssao_sharpness:
.. rst-class:: classref-property
:ref:`float<class_float>` **ssao_sharpness** = ``0.98`` :ref:`🔗<class_Environment_property_ssao_sharpness>`
.. rst-class:: classref-property-setget
- |void| **set_ssao_sharpness**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_ssao_sharpness**\ (\ )
允许屏幕空间环境光遮蔽效果,在对象边缘上模糊的量。设置太高,会导致对象边缘出现锯齿。设置太低,会使对象边缘显得模糊。
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_ssil_enabled:
.. rst-class:: classref-property
:ref:`bool<class_bool>` **ssil_enabled** = ``false`` :ref:`🔗<class_Environment_property_ssil_enabled>`
.. rst-class:: classref-property-setget
- |void| **set_ssil_enabled**\ (\ value\: :ref:`bool<class_bool>`\ )
- :ref:`bool<class_bool>` **is_ssil_enabled**\ (\ )
如果为 ``true``\ ,则启用屏幕空间间接照明效果。屏幕空间间接照明是一种间接照明形式,它允许漫射光在附近的物体之间反射。屏幕空间间接照明与屏幕空间环境光遮蔽的工作方式非常相似,因为它只影响有限的范围。它旨在与 SDFGI 或 :ref:`VoxelGI<class_VoxelGI>` 等适当的全局照明形式一起使用。屏幕空间间接光照不受单个光源 :ref:`Light3D.light_indirect_energy<class_Light3D_property_light_indirect_energy>` 的影响。
\ **注意:**\ SSIL 只支持 Forward+ 渲染方式,不支持 Mobile 或 Compatibility。
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_ssil_intensity:
.. rst-class:: classref-property
:ref:`float<class_float>` **ssil_intensity** = ``1.0`` :ref:`🔗<class_Environment_property_ssil_intensity>`
.. rst-class:: classref-property-setget
- |void| **set_ssil_intensity**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_ssil_intensity**\ (\ )
屏幕空间间接照明效果的亮度倍增器。更高的值会产生更亮的光。
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_ssil_normal_rejection:
.. rst-class:: classref-property
:ref:`float<class_float>` **ssil_normal_rejection** = ``1.0`` :ref:`🔗<class_Environment_property_ssil_normal_rejection>`
.. rst-class:: classref-property-setget
- |void| **set_ssil_normal_rejection**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_ssil_normal_rejection**\ (\ )
计算屏幕空间间接照明时,使用的法线抛弃量。法线抛弃使用给定样本点的法线,来抛弃远离当前像素的样本。当只有物体的一侧被照亮时,为了避免漏光法线抛弃是必要的。但是,如果需要漏光,则可以禁用法线抛弃,例如当场景主要包含自发光对象,且其发光面从相机无法看到时。
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_ssil_radius:
.. rst-class:: classref-property
:ref:`float<class_float>` **ssil_radius** = ``5.0`` :ref:`🔗<class_Environment_property_ssil_radius>`
.. rst-class:: classref-property-setget
- |void| **set_ssil_radius**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_ssil_radius**\ (\ )
使用屏幕空间间接照明效果时,反射光可以传播的距离。较大的值,会导致光线在场景中进一步反弹,但可能会导致采样不足的伪影,看起来像光源周围的长尖峰。
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_ssil_sharpness:
.. rst-class:: classref-property
:ref:`float<class_float>` **ssil_sharpness** = ``0.98`` :ref:`🔗<class_Environment_property_ssil_sharpness>`
.. rst-class:: classref-property-setget
- |void| **set_ssil_sharpness**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_ssil_sharpness**\ (\ )
允许屏幕空间间接照明效果,在对象边缘上模糊的量。设置太高,会导致对象边缘出现锯齿。设置太低,会使对象边缘显得模糊。
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_ssr_depth_tolerance:
.. rst-class:: classref-property
:ref:`float<class_float>` **ssr_depth_tolerance** = ``0.5`` :ref:`🔗<class_Environment_property_ssr_depth_tolerance>`
.. rst-class:: classref-property-setget
- |void| **set_ssr_depth_tolerance**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_ssr_depth_tolerance**\ (\ )
屏幕空间反射的深度公差。
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_ssr_enabled:
.. rst-class:: classref-property
:ref:`bool<class_bool>` **ssr_enabled** = ``false`` :ref:`🔗<class_Environment_property_ssr_enabled>`
.. rst-class:: classref-property-setget
- |void| **set_ssr_enabled**\ (\ value\: :ref:`bool<class_bool>`\ )
- :ref:`bool<class_bool>` **is_ssr_enabled**\ (\ )
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.
\ **Note:** SSR is only supported in the Forward+ rendering method, not Mobile or Compatibility.
\ **Note:** SSR is not supported on viewports that have a transparent background (where :ref:`Viewport.transparent_bg<class_Viewport_property_transparent_bg>` is ``true``).
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_ssr_fade_in:
.. rst-class:: classref-property
:ref:`float<class_float>` **ssr_fade_in** = ``0.15`` :ref:`🔗<class_Environment_property_ssr_fade_in>`
.. rst-class:: classref-property-setget
- |void| **set_ssr_fade_in**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_ssr_fade_in**\ (\ )
屏幕空间反射的淡入距离。影响从反射材质到屏幕空间反射的区域。只有正值有效(负值将被钳制为 ``0.0``\ )。
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_ssr_fade_out:
.. rst-class:: classref-property
:ref:`float<class_float>` **ssr_fade_out** = ``2.0`` :ref:`🔗<class_Environment_property_ssr_fade_out>`
.. rst-class:: classref-property-setget
- |void| **set_ssr_fade_out**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_ssr_fade_out**\ (\ )
屏幕空间反射的淡出距离。影响从屏幕空间反射到“全局”反射的区域。只有正值有效(负值将被钳制为 ``0.0``\ )。
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_ssr_max_steps:
.. rst-class:: classref-property
:ref:`int<class_int>` **ssr_max_steps** = ``64`` :ref:`🔗<class_Environment_property_ssr_max_steps>`
.. rst-class:: classref-property-setget
- |void| **set_ssr_max_steps**\ (\ value\: :ref:`int<class_int>`\ )
- :ref:`int<class_int>` **get_ssr_max_steps**\ (\ )
屏幕空间反射的最大步数。数值越高,速度越慢。
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_tonemap_agx_contrast:
.. rst-class:: classref-property
:ref:`float<class_float>` **tonemap_agx_contrast** = ``1.25`` :ref:`🔗<class_Environment_property_tonemap_agx_contrast>`
.. rst-class:: classref-property-setget
- |void| **set_tonemap_agx_contrast**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_tonemap_agx_contrast**\ (\ )
Increasing :ref:`tonemap_agx_contrast<class_Environment_property_tonemap_agx_contrast>` will make dark values darker and bright values brighter. Produces a higher quality result than :ref:`adjustment_contrast<class_Environment_property_adjustment_contrast>` without any additional performance cost, but is only available when using the :ref:`TONE_MAPPER_AGX<class_Environment_constant_TONE_MAPPER_AGX>` tonemapper.
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_tonemap_agx_white:
.. rst-class:: classref-property
:ref:`float<class_float>` **tonemap_agx_white** = ``16.29`` :ref:`🔗<class_Environment_property_tonemap_agx_white>`
.. rst-class:: classref-property-setget
- |void| **set_tonemap_agx_white**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_tonemap_agx_white**\ (\ )
The white reference value for tonemapping, which indicates where bright white is located in the scale of values provided to the tonemapper. For photorealistic lighting, it is recommended to set :ref:`tonemap_agx_white<class_Environment_property_tonemap_agx_white>` to at least ``6.0``. Higher values result in less blown out highlights, but may make the scene appear lower contrast. :ref:`tonemap_agx_white<class_Environment_property_tonemap_agx_white>` is the same as :ref:`tonemap_white<class_Environment_property_tonemap_white>`, but is only effective with the :ref:`TONE_MAPPER_AGX<class_Environment_constant_TONE_MAPPER_AGX>` tonemapper. See also :ref:`tonemap_exposure<class_Environment_property_tonemap_exposure>`.
\ **Note:** When using the Mobile renderer with :ref:`Viewport.use_hdr_2d<class_Viewport_property_use_hdr_2d>` disabled, :ref:`tonemap_agx_white<class_Environment_property_tonemap_agx_white>` is ignored and a white value of ``2.0`` will always be used instead.
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_tonemap_exposure:
.. rst-class:: classref-property
:ref:`float<class_float>` **tonemap_exposure** = ``1.0`` :ref:`🔗<class_Environment_property_tonemap_exposure>`
.. rst-class:: classref-property-setget
- |void| **set_tonemap_exposure**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_tonemap_exposure**\ (\ )
在将值提供给色调映射器之前调整亮度。\ :ref:`tonemap_exposure<class_Environment_property_tonemap_exposure>` 取值越大图像越亮。另见 :ref:`tonemap_white<class_Environment_property_tonemap_white>`\ 。
\ **注意:**\ 提供给色调映射器的值还将乘以 ``2.0````1.8``\ ,分别对应 :ref:`TONE_MAPPER_FILMIC<class_Environment_constant_TONE_MAPPER_FILMIC>` 和 :ref:`TONE_MAPPER_ACES<class_Environment_constant_TONE_MAPPER_ACES>`\ ,会产生与 :ref:`TONE_MAPPER_LINEAR<class_Environment_constant_TONE_MAPPER_LINEAR>` 相似的明显亮度。
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_tonemap_mode:
.. rst-class:: classref-property
:ref:`ToneMapper<enum_Environment_ToneMapper>` **tonemap_mode** = ``0`` :ref:`🔗<class_Environment_property_tonemap_mode>`
.. rst-class:: classref-property-setget
- |void| **set_tonemapper**\ (\ value\: :ref:`ToneMapper<enum_Environment_ToneMapper>`\ )
- :ref:`ToneMapper<enum_Environment_ToneMapper>` **get_tonemapper**\ (\ )
要使用的色调映射模式。色调映射是对 HDR 值进行“转换”的过程,转换后的值适合在 LDR 显示器上渲染。Godot 尚不支持在 HDR 显示器上进行渲染。)
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_tonemap_white:
.. rst-class:: classref-property
:ref:`float<class_float>` **tonemap_white** = ``1.0`` :ref:`🔗<class_Environment_property_tonemap_white>`
.. rst-class:: classref-property-setget
- |void| **set_tonemap_white**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_tonemap_white**\ (\ )
The white reference value for tonemapping, which indicates where bright white is located in the scale of values provided to the tonemapper. For photorealistic lighting, it is recommended to set :ref:`tonemap_white<class_Environment_property_tonemap_white>` to at least ``6.0``. Higher values result in less blown out highlights, but may make the scene appear lower contrast. :ref:`tonemap_agx_white<class_Environment_property_tonemap_agx_white>` will be used instead when using the :ref:`TONE_MAPPER_AGX<class_Environment_constant_TONE_MAPPER_AGX>` tonemapper. See also :ref:`tonemap_exposure<class_Environment_property_tonemap_exposure>`.
\ **Note:** :ref:`tonemap_white<class_Environment_property_tonemap_white>` must be set to ``2.0`` or lower on the Mobile renderer to produce bright images.
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_volumetric_fog_albedo:
.. rst-class:: classref-property
:ref:`Color<class_Color>` **volumetric_fog_albedo** = ``Color(1, 1, 1, 1)`` :ref:`🔗<class_Environment_property_volumetric_fog_albedo>`
.. rst-class:: classref-property-setget
- |void| **set_volumetric_fog_albedo**\ (\ value\: :ref:`Color<class_Color>`\ )
- :ref:`Color<class_Color>` **get_volumetric_fog_albedo**\ (\ )
与灯光交互时体积雾的 :ref:`Color<class_Color>`\ 。当烟雾的反照率颜色更暗时,薄雾和雾的反照率颜色接近 ``Color(1, 1, 1, 1)``\ 。
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_volumetric_fog_ambient_inject:
.. rst-class:: classref-property
:ref:`float<class_float>` **volumetric_fog_ambient_inject** = ``0.0`` :ref:`🔗<class_Environment_property_volumetric_fog_ambient_inject>`
.. rst-class:: classref-property-setget
- |void| **set_volumetric_fog_ambient_inject**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_volumetric_fog_ambient_inject**\ (\ )
衡量体积雾中使用的环境光的强度。值为 ``0.0`` ,意味着环境光不会影响体积雾。当 :ref:`volumetric_fog_ambient_inject<class_Environment_property_volumetric_fog_ambient_inject>` 设置高于 ``0.0`` 时,会有一个小的性能成本。
\ **注意:**\ 如果 :ref:`volumetric_fog_density<class_Environment_property_volumetric_fog_density>```0.0``\ ,或 :ref:`volumetric_fog_albedo<class_Environment_property_volumetric_fog_albedo>` 是全黑的颜色,则该属性没有可见效果。
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_volumetric_fog_anisotropy:
.. rst-class:: classref-property
:ref:`float<class_float>` **volumetric_fog_anisotropy** = ``0.2`` :ref:`🔗<class_Environment_property_volumetric_fog_anisotropy>`
.. rst-class:: classref-property-setget
- |void| **set_volumetric_fog_anisotropy**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_volumetric_fog_anisotropy**\ (\ )
散射光穿过体积雾时的方向。接近 ``1.0`` 的值意味着几乎所有的光都是向前散射的。接近 ``0.0`` 的值表示光在所有方向上均匀散射。接近 ``-1.0`` 的值表示光主要向后散射。雾和薄雾会稍微向前散射光,而烟雾则向各个方向均匀散射光。
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_volumetric_fog_density:
.. rst-class:: classref-property
:ref:`float<class_float>` **volumetric_fog_density** = ``0.05`` :ref:`🔗<class_Environment_property_volumetric_fog_density>`
.. rst-class:: classref-property-setget
- |void| **set_volumetric_fog_density**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_volumetric_fog_density**\ (\ )
体积雾的基本\ *指数*\ 密度。将其设置为希望全局拥有的最低密度。\ :ref:`FogVolume<class_FogVolume>` 可用于增加或减少特定区域的密度。雾渲染如同在现实生活中一样是指数式的。
\ ``0.0`` 的值会禁用全局体积雾,同时允许 :ref:`FogVolume<class_FogVolume>` 在特定区域显示体积雾。
要使体积雾作为一种体积\ *照明*\ 解决方案,请将 :ref:`volumetric_fog_density<class_Environment_property_volumetric_fog_density>` 设置为最低的非零值(\ ``0.0001``\ ),然后将灯光的 :ref:`Light3D.light_volumetric_fog_energy<class_Light3D_property_light_volumetric_fog_energy>` 增加到 ``10000````100000`` 之间的值,以补偿极低的密度。
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_volumetric_fog_detail_spread:
.. rst-class:: classref-property
:ref:`float<class_float>` **volumetric_fog_detail_spread** = ``2.0`` :ref:`🔗<class_Environment_property_volumetric_fog_detail_spread>`
.. rst-class:: classref-property-setget
- |void| **set_volumetric_fog_detail_spread**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_volumetric_fog_detail_spread**\ (\ )
视锥体素缓冲区长度的大小分布。较高的值会压缩更靠近相机的视锥体素,并将更多细节放置在更靠近相机的位置。
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_volumetric_fog_emission:
.. rst-class:: classref-property
:ref:`Color<class_Color>` **volumetric_fog_emission** = ``Color(0, 0, 0, 1)`` :ref:`🔗<class_Environment_property_volumetric_fog_emission>`
.. rst-class:: classref-property-setget
- |void| **set_volumetric_fog_emission**\ (\ value\: :ref:`Color<class_Color>`\ )
- :ref:`Color<class_Color>` **get_volumetric_fog_emission**\ (\ )
从体积雾发出的光。即使有自发光,体积雾也不会将光投射到其他表面上。自发光对于建立环境颜色很有用。由于体积雾效果仅使用单次散射,因此雾往往需要一点点自发光来柔化刺眼的阴影。
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_volumetric_fog_emission_energy:
.. rst-class:: classref-property
:ref:`float<class_float>` **volumetric_fog_emission_energy** = ``1.0`` :ref:`🔗<class_Environment_property_volumetric_fog_emission_energy>`
.. rst-class:: classref-property-setget
- |void| **set_volumetric_fog_emission_energy**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_volumetric_fog_emission_energy**\ (\ )
从体积雾发出的光的亮度。
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_volumetric_fog_enabled:
.. rst-class:: classref-property
:ref:`bool<class_bool>` **volumetric_fog_enabled** = ``false`` :ref:`🔗<class_Environment_property_volumetric_fog_enabled>`
.. rst-class:: classref-property-setget
- |void| **set_volumetric_fog_enabled**\ (\ value\: :ref:`bool<class_bool>`\ )
- :ref:`bool<class_bool>` **is_volumetric_fog_enabled**\ (\ )
启用体积雾效果。体积雾使用与屏幕对齐的视锥体素缓冲区,来计算短至中等范围内的精确体积散射。体积雾与 :ref:`FogVolume<class_FogVolume>` 和灯光交互,以计算局部和全局的雾。体积雾使用一个基于消光、散射和自发光的 PBR 单一散射模型,它以密度、反照率和自发光的形式暴露给用户。
\ **注意:**\ 体积雾只支持 Forward+ 渲染方式,不支持移动和兼容模式。
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_volumetric_fog_gi_inject:
.. rst-class:: classref-property
:ref:`float<class_float>` **volumetric_fog_gi_inject** = ``1.0`` :ref:`🔗<class_Environment_property_volumetric_fog_gi_inject>`
.. rst-class:: classref-property-setget
- |void| **set_volumetric_fog_gi_inject**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_volumetric_fog_gi_inject**\ (\ )
衡量体积雾的反照率颜色中使用的全局照明的强度。值为\ ``0.0`` ,意味着全局照明不会影响体积雾。当 :ref:`volumetric_fog_gi_inject<class_Environment_property_volumetric_fog_gi_inject>` 设置高于\ ``0.0`` 时,会有很小的性能成本。
\ **注意:**\ 如果 :ref:`volumetric_fog_density<class_Environment_property_volumetric_fog_density>```0.0``\ ,或 :ref:`volumetric_fog_albedo<class_Environment_property_volumetric_fog_albedo>` 是全黑的颜色,则该选项没有可见效果。
\ **注意:**\ 在使用 :ref:`volumetric_fog_gi_inject<class_Environment_property_volumetric_fog_gi_inject>` 时,只有 :ref:`VoxelGI<class_VoxelGI>` 和 SDFGI\ :ref:`sdfgi_enabled<class_Environment_property_sdfgi_enabled>`\ )会被考虑到。来自 :ref:`LightmapGI<class_LightmapGI>`\ 、\ :ref:`ReflectionProbe<class_ReflectionProbe>` 和 SSIL参见 :ref:`ssil_enabled<class_Environment_property_ssil_enabled>`\ )的全局照明将被体积雾所忽略。
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_volumetric_fog_length:
.. rst-class:: classref-property
:ref:`float<class_float>` **volumetric_fog_length** = ``64.0`` :ref:`🔗<class_Environment_property_volumetric_fog_length>`
.. rst-class:: classref-property-setget
- |void| **set_volumetric_fog_length**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_volumetric_fog_length**\ (\ )
计算体积雾的距离。增加以在更大范围内计算雾,减少以在不需要长范围时添加更多细节。为了获得最佳质量的雾,请将其保持在尽可能低的水平。另见 :ref:`ProjectSettings.rendering/environment/volumetric_fog/volume_depth<class_ProjectSettings_property_rendering/environment/volumetric_fog/volume_depth>`\ 。
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_volumetric_fog_sky_affect:
.. rst-class:: classref-property
:ref:`float<class_float>` **volumetric_fog_sky_affect** = ``1.0`` :ref:`🔗<class_Environment_property_volumetric_fog_sky_affect>`
.. rst-class:: classref-property-setget
- |void| **set_volumetric_fog_sky_affect**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_volumetric_fog_sky_affect**\ (\ )
使用体积雾影响天空时使用的系数。\ ``1.0``\ 表示体积雾可以完全遮蔽天空。较低的值会减少体积雾对天空渲染的影响,\ ``0.0`` 根本不会影响天空的渲染。
\ **注意:**\ 即使 :ref:`volumetric_fog_density<class_Environment_property_volumetric_fog_density>```0.0``\ \ :ref:`volumetric_fog_sky_affect<class_Environment_property_volumetric_fog_sky_affect>` 也会影响 :ref:`FogVolume<class_FogVolume>`\ 。如果发现 :ref:`FogVolume<class_FogVolume>` 在仰望天空时正在消失,请将 :ref:`volumetric_fog_sky_affect<class_Environment_property_volumetric_fog_sky_affect>` 设置为 ``1.0``\ 。
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_volumetric_fog_temporal_reprojection_amount:
.. rst-class:: classref-property
:ref:`float<class_float>` **volumetric_fog_temporal_reprojection_amount** = ``0.9`` :ref:`🔗<class_Environment_property_volumetric_fog_temporal_reprojection_amount>`
.. rst-class:: classref-property-setget
- |void| **set_volumetric_fog_temporal_reprojection_amount**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_volumetric_fog_temporal_reprojection_amount**\ (\ )
将最后一帧与当前帧混合的量。更高的数值会导致体积雾更平滑,但会使“重影”变得更糟。更低的值会减少重影,但会导致每帧时间抖动变得可见。
.. rst-class:: classref-item-separator
----
.. _class_Environment_property_volumetric_fog_temporal_reprojection_enabled:
.. rst-class:: classref-property
:ref:`bool<class_bool>` **volumetric_fog_temporal_reprojection_enabled** = ``true`` :ref:`🔗<class_Environment_property_volumetric_fog_temporal_reprojection_enabled>`
.. rst-class:: classref-property-setget
- |void| **set_volumetric_fog_temporal_reprojection_enabled**\ (\ value\: :ref:`bool<class_bool>`\ )
- :ref:`bool<class_bool>` **is_volumetric_fog_temporal_reprojection_enabled**\ (\ )
在体积雾中启用时间重投影。时间重投影将当前帧的体积雾与上一帧的体积雾混合,以平滑锯齿状的边缘。性能成本最小;但是,它会导致移动 :ref:`FogVolume<class_FogVolume>`:ref:`Light3D<class_Light3D>` 时“重影”,并在它们身后留下痕迹。启用时间重投影时,尽量避免将 :ref:`FogVolume<class_FogVolume>`:ref:`Light3D<class_Light3D>` 移动得太快。短暂的动态光照效果应将 :ref:`Light3D.light_volumetric_fog_energy<class_Light3D_property_light_volumetric_fog_energy>` 设置为 ``0.0`` 以避免重影。
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
方法说明
--------
.. _class_Environment_method_get_glow_level:
.. rst-class:: classref-method
:ref:`float<class_float>` **get_glow_level**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Environment_method_get_glow_level>`
返回辉光级别 ``idx`` 的强度。
.. rst-class:: classref-item-separator
----
.. _class_Environment_method_set_glow_level:
.. rst-class:: classref-method
|void| **set_glow_level**\ (\ idx\: :ref:`int<class_int>`, intensity\: :ref:`float<class_float>`\ ) :ref:`🔗<class_Environment_method_set_glow_level>`
设置辉光级别 ``idx`` 的强度。大于 ``0.0`` 时启用该级别。每个级别都依赖于前一个级别。这意味着启用较高的辉光等级会减慢辉光效果的渲染速度,即使之前的等级没有启用。
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
.. |const| replace:: :abbr:`const (本方法无副作用,不会修改该实例的任何成员变量。)`
.. |vararg| replace:: :abbr:`vararg (本方法除了能接受在此处描述的参数外,还能够继续接受任意数量的参数。)`
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
.. |static| replace:: :abbr:`static (调用本方法无需实例,可直接使用类名进行调用。)`
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效运算符。)`
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列位标志构成位掩码的整数。)`
.. |void| replace:: :abbr:`void (无返回值。)`