You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-20 14:45:44 +00:00
Merge pull request #100427 from Namey5/fog-sky-luminance
Separate sky luminance and brightness calculations for consistent fog
This commit is contained in:
@@ -17,8 +17,9 @@ layout(push_constant, std430) uniform Params {
|
||||
vec4 projection; // only applicable if not multiview
|
||||
vec3 position;
|
||||
float time;
|
||||
vec3 pad;
|
||||
vec2 pad;
|
||||
float luminance_multiplier;
|
||||
float brightness_multiplier;
|
||||
}
|
||||
params;
|
||||
|
||||
@@ -57,8 +58,9 @@ layout(push_constant, std430) uniform Params {
|
||||
vec4 projection; // only applicable if not multiview
|
||||
vec3 position;
|
||||
float time;
|
||||
vec3 pad;
|
||||
vec2 pad;
|
||||
float luminance_multiplier;
|
||||
float brightness_multiplier;
|
||||
}
|
||||
params;
|
||||
|
||||
@@ -255,6 +257,9 @@ void main() {
|
||||
frag_color.rgb = color;
|
||||
frag_color.a = alpha;
|
||||
|
||||
// Apply environment 'brightness' setting separately before fog to ensure consistent luminance.
|
||||
frag_color.rgb = frag_color.rgb * params.brightness_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.
|
||||
|
||||
Reference in New Issue
Block a user