diff options
author | Thomas ten Cate <ttencate@gmail.com> | 2024-10-05 13:04:47 +0200 |
---|---|---|
committer | Thomas ten Cate <ttencate@gmail.com> | 2024-10-07 09:09:09 +0200 |
commit | 7df2804a30e82577caadeaddf733a43aebbd8f5d (patch) | |
tree | eb757813a3e686a74f0e30c779eb2366309fa458 /doc | |
parent | db66bd35af704fe0d83ba9348b8c50a48e51b2ba (diff) | |
download | redot-engine-7df2804a30e82577caadeaddf733a43aebbd8f5d.tar.gz |
Clarify that fog_aerial_perspective does not actually use sky color
See #97803.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/classes/Environment.xml | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/doc/classes/Environment.xml b/doc/classes/Environment.xml index de3295fbe0..1779408a4d 100644 --- a/doc/classes/Environment.xml +++ b/doc/classes/Environment.xml @@ -81,8 +81,9 @@ The background mode. See [enum BGMode] for possible values. </member> <member name="fog_aerial_perspective" type="float" setter="set_fog_aerial_perspective" getter="get_fog_aerial_perspective" default="0.0"> - If set above [code]0.0[/code] (exclusive), blends between the fog's color and the color of the background [Sky]. This has a small performance cost when set above [code]0.0[/code]. Must have [member background_mode] set to [constant BG_SKY]. + If set above [code]0.0[/code] (exclusive), blends between the fog's color and the color of the background [Sky], as read from the radiance cubemap. This has a small performance cost when set above [code]0.0[/code]. Must have [member background_mode] set to [constant BG_SKY]. This is useful to simulate [url=https://en.wikipedia.org/wiki/Aerial_perspective]aerial perspective[/url] in large scenes with low density fog. However, it is not very useful for high-density fog, as the sky will shine through. When set to [code]1.0[/code], the fog color comes completely from the [Sky]. If set to [code]0.0[/code], aerial perspective is disabled. + Notice that this does not sample the [Sky] directly, but rather the radiance cubemap. The cubemap is sampled at a mipmap level depending on the depth of the rendered pixel; the farther away, the higher the resolution of the sampled mipmap. This results in the actual color being a blurred version of the sky, with more blur closer to the camera. The highest mipmap resolution is used at a depth of [member Camera3D.far]. </member> <member name="fog_density" type="float" setter="set_fog_density" getter="get_fog_density" default="0.01"> The fog density to be used. This is demonstrated in different ways depending on the [member fog_mode] mode chosen: |