diff options
author | clayjohn <claynjohn@gmail.com> | 2024-08-16 15:28:19 -0700 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2024-09-16 17:01:45 +0200 |
commit | 6c202154a7c93c4381f8116962fcd0a81d3c7e58 (patch) | |
tree | f10a4c6a45a0bd8f93aa9177fa18d0ecfb08207d /servers | |
parent | 6d41487459f1545c8db9bb8927c25fcf28914225 (diff) | |
download | redot-engine-6c202154a7c93c4381f8116962fcd0a81d3c7e58.tar.gz |
Add fixed fog to the sky in the Compatibility renderer
And apply luminance multiplier after fog in RD renderer
(cherry picked from commit 578049b7b9b9ba5d0ad02f89698a593c368ab7fc)
Diffstat (limited to 'servers')
-rw-r--r-- | servers/rendering/renderer_rd/shaders/environment/sky.glsl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/servers/rendering/renderer_rd/shaders/environment/sky.glsl b/servers/rendering/renderer_rd/shaders/environment/sky.glsl index 35457a2482..5aa3735494 100644 --- a/servers/rendering/renderer_rd/shaders/environment/sky.glsl +++ b/servers/rendering/renderer_rd/shaders/environment/sky.glsl @@ -255,10 +255,6 @@ void main() { frag_color.rgb = color; frag_color.a = alpha; - // For mobile renderer we're multiplying by 0.5 as we're using a UNORM buffer. - // For both mobile and clustered, we also bake in the exposure value for the environment and camera. - frag_color.rgb = frag_color.rgb * params.luminance_multiplier; - #if !defined(DISABLE_FOG) && !defined(USE_CUBEMAP_PASS) // Draw "fixed" fog before volumetric fog to ensure volumetric fog can appear in front of the sky. @@ -278,6 +274,10 @@ void main() { #endif // DISABLE_FOG + // For mobile renderer we're multiplying by 0.5 as we're using a UNORM buffer. + // For both mobile and clustered, we also bake in the exposure value for the environment and camera. + frag_color.rgb = frag_color.rgb * params.luminance_multiplier; + // Blending is disabled for Sky, so alpha doesn't blend. // Alpha is used for subsurface scattering so make sure it doesn't get applied to Sky. if (!AT_CUBEMAP_PASS && !AT_HALF_RES_PASS && !AT_QUARTER_RES_PASS) { |