diff options
author | RunitaiLinden <davep@lindenlab.com> | 2023-04-11 15:09:58 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-11 15:09:58 -0500 |
commit | 2b2154f0217758b27b544d066024d922ba234d51 (patch) | |
tree | fafed45d3e9cc21b04e2babf6bf19d1a476fc88a /indra/newview/app_settings/shaders/class1/environment | |
parent | 474739226433a74cdca05a949586139a9c9c0bbd (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/class1/environment')
-rw-r--r-- | indra/newview/app_settings/shaders/class1/environment/srgbF.glsl | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/indra/newview/app_settings/shaders/class1/environment/srgbF.glsl b/indra/newview/app_settings/shaders/class1/environment/srgbF.glsl index 4a8b892c3a..a3b48e0898 100644 --- a/indra/newview/app_settings/shaders/class1/environment/srgbF.glsl +++ b/indra/newview/app_settings/shaders/class1/environment/srgbF.glsl @@ -72,7 +72,7 @@ vec3 rgb2hsv(vec3 c) vec4 q = mix(vec4(p.xyw, c.r), vec4(c.r, p.yzx), step(p.x, c.r)); float d = q.x - min(q.w, q.y); - float e = 1.0e-10; + float e = 1.0e-3; return vec3(abs(q.z + (q.w - q.y) / (6.0 * d + e)), d / (q.x + e), q.x); } @@ -82,3 +82,30 @@ vec3 hsv2rgb(vec3 c) vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www); return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y); } + +vec3 legacy_adjust_no_brighten(vec3 c) +{ + vec3 desat = rgb2hsv(c.rgb); + desat.g *= 0.75; + desat.rgb = hsv2rgb(desat); + return desat; +} + +vec3 legacy_adjust(vec3 c) +{ +#if 1 + vec3 desat = rgb2hsv(c.rgb); + desat.g *= 1.0-(1.0-desat.b)*0.5; + //desat.g = max(desat.g-0.1*c.b-0.1, 0.0); + desat.b += (1.0-desat.b)*0.1f; + desat.rgb = hsv2rgb(desat); + return desat; +#else + return c; +#endif +} + +vec3 legacy_adjust_post(vec3 c) +{ + return c; +} |