summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class2
diff options
context:
space:
mode:
authorRunitaiLinden <davep@lindenlab.com>2023-04-11 15:09:58 -0500
committerGitHub <noreply@github.com>2023-04-11 15:09:58 -0500
commit2b2154f0217758b27b544d066024d922ba234d51 (patch)
treefafed45d3e9cc21b04e2babf6bf19d1a476fc88a /indra/newview/app_settings/shaders/class2
parent474739226433a74cdca05a949586139a9c9c0bbd (diff)
SL-19564 Rebalance exposure and sky. Hack legacy diffuse map saturation and brightness to allow ACES Hill all the time.
Diffstat (limited to 'indra/newview/app_settings/shaders/class2')
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class2/windlight/atmosphericsF.glsl4
-rw-r--r--indra/newview/app_settings/shaders/class2/windlight/atmosphericsFuncs.glsl8
3 files changed, 7 insertions, 7 deletions
diff --git a/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl b/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl
index 53552870ae..f4d6eff69e 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl
@@ -77,6 +77,7 @@ vec4 applyWaterFogViewLinear(vec3 pos, vec4 color, vec3 sunlit);
vec3 srgb_to_linear(vec3 c);
vec3 linear_to_srgb(vec3 c);
+vec3 legacy_adjust(vec3 c);
vec2 encode_normal (vec3 n);
vec3 atmosFragLightingLinear(vec3 light, vec3 additive, vec3 atten);
@@ -239,6 +240,7 @@ void main()
}
diffuse_srgb.rgb *= vertex_color.rgb;
+ diffuse_srgb.rgb = legacy_adjust(diffuse_srgb.rgb);
diffuse_linear.rgb = srgb_to_linear(diffuse_srgb.rgb);
#endif // USE_VERTEX_COLOR
diff --git a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsF.glsl b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsF.glsl
index 49ff49fdd8..e314555ef9 100644
--- a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsF.glsl
+++ b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsF.glsl
@@ -36,9 +36,9 @@ vec3 atmosFragLighting(vec3 light, vec3 additive, vec3 atten)
{
light *= atten.r;
additive = srgb_to_linear(additive*2.0);
- // magic 3.0 here is to match the default RenderSkyHDRScale -- this parameter needs to be plumbed into sky settings or something
+ // magic 1.25 here is to match the default RenderSkyHDRScale -- this parameter needs to be plumbed into sky settings or something
// so it's available to all shaders that call atmosFragLighting instead of just softenLightF.glsl
- additive *= sun_up_factor*3.0 + 1.0;
+ additive *= sun_up_factor*1.25 + 1.0;
light += additive;
return light;
}
diff --git a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsFuncs.glsl b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsFuncs.glsl
index 14ce33f81f..22db9dce03 100644
--- a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsFuncs.glsl
+++ b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsFuncs.glsl
@@ -139,10 +139,8 @@ void calcAtmosphericVars(vec3 inPositionEye, vec3 light_dir, float ambFactor, ou
// brightness of surface both sunlight and ambient
- // fudge sunlit and amblit to get consistent lighting compared to legacy
- // midday before PBR was a thing
- sunlit = sunlight.rgb * (1.0+sun_up_factor*0.2);
- amblit = tmpAmbient.rgb * 0.25;
+ sunlit = sunlight.rgb;
+ amblit = vec3(1,0,1); //should no longer be used, filled in by calcAtmosphericVarsLinear
additive *= vec3(1.0 - combined_haze);
}
@@ -172,7 +170,7 @@ void calcAtmosphericVarsLinear(vec3 inPositionEye, vec3 norm, vec3 light_dir, ou
sunlit *= 2.0;
// squash ambient to approximate whatever weirdness legacy atmospherics were doing
- amblit = ambient_color * 0.5 * (1.0+sun_up_factor*0.3);
+ amblit = ambient_color; // * (1.0+sun_up_factor*0.3);
amblit *= ambientLighting(norm, light_dir);
amblit = srgb_to_linear(amblit);