diff options
author | Graham Linden <graham@lindenlab.com> | 2019-04-10 10:11:50 -0700 |
---|---|---|
committer | Graham Linden <graham@lindenlab.com> | 2019-04-10 10:11:50 -0700 |
commit | 2c568e7584ed4a5c000b2064a4d06f4b2347a34a (patch) | |
tree | 0cb7e61f0aa382c77c6518daace9cd001128b778 /indra/newview/app_settings/shaders | |
parent | f9c0b021ea1a695c0d5d4042981045fe265e7918 (diff) |
SL-10925, SL-10926, SL-10896
New fix for 925/926 that doesn't cause 896 again.
Also linearize moon disc tex color.
Diffstat (limited to 'indra/newview/app_settings/shaders')
-rw-r--r-- | indra/newview/app_settings/shaders/class1/deferred/moonF.glsl | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/moonF.glsl b/indra/newview/app_settings/shaders/class1/deferred/moonF.glsl index 7732cf986e..aae6158673 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/moonF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/moonF.glsl @@ -44,6 +44,8 @@ uniform sampler2D altDiffuseMap; uniform float blend_factor; // interp factor between moon A/B VARYING vec2 vary_texcoord0; +vec3 srgb_to_linear(vec3 c); + void main() { vec4 moonA = texture2D(diffuseMap, vary_texcoord0.xy); @@ -58,6 +60,8 @@ void main() vec3 exp = vec3(1.0 - mix * moon_brightness) * 2.0 - 1.0; c.rgb = pow(c.rgb, exp); + c.rgb = srgb_to_linear(c.rgb); + //c.rgb *= moonlight_color.rgb; frag_data[0] = vec4(c.rgb, c.a); |