mirror of
https://github.com/godotengine/godot
synced 2024-09-16 04:37:10 +00:00
Merge pull request #75812 from RandomCatDude/sky-fog-luminance-fix
Move sky luminance scaling to before fog is applied
This commit is contained in:
commit
ef17794d17
|
@ -260,6 +260,10 @@ void main() {
|
||||||
frag_color.rgb = color;
|
frag_color.rgb = color;
|
||||||
frag_color.a = alpha;
|
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)
|
#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.
|
// Draw "fixed" fog before volumetric fog to ensure volumetric fog can appear in front of the sky.
|
||||||
|
@ -285,10 +289,6 @@ void main() {
|
||||||
frag_color.a = 0.0;
|
frag_color.a = 0.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 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;
|
|
||||||
|
|
||||||
#ifdef USE_DEBANDING
|
#ifdef USE_DEBANDING
|
||||||
frag_color.rgb += interleaved_gradient_noise(gl_FragCoord.xy);
|
frag_color.rgb += interleaved_gradient_noise(gl_FragCoord.xy);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue