summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2018-09-04 23:39:21 +0100
committerGraham Linden <graham@lindenlab.com>2018-09-04 23:39:21 +0100
commit0a78e9271c524c92cb8b1965e9a6081d4f700437 (patch)
tree2326794a84a61ddd1cbaa2af7760a956bd44837d /indra/newview/app_settings
parent2e55eae9cc6ebff303c8f322c71fec9c20e42bd8 (diff)
Make legacy star brightness setting convert to 0-512 range of new settings.
Make brightness scale in shader more linear and fix twinkling.
Diffstat (limited to 'indra/newview/app_settings')
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/starsF.glsl8
1 files changed, 5 insertions, 3 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/starsF.glsl b/indra/newview/app_settings/shaders/class1/deferred/starsF.glsl
index 6c616db442..4ae3f7b76f 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/starsF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/starsF.glsl
@@ -53,9 +53,11 @@ void main()
vec4 col_b = texture2D(diffuseMap, vary_texcoord0.xy);
vec4 col = mix(col_b, col_a, blend_factor);
col.rgb *= vertex_color.rgb;
- col.a = (col.a * custom_alpha) * 8.0f;
- col.a += twinkle() * 2.0f;
- col.a = max(0.0f, col.a);
+
+ float factor = smoothstep(0.0f, 0.9f, custom_alpha);
+
+ col.a = (col.a * factor) * 32.0f;
+ col.a *= twinkle();
frag_data[0] = col;
frag_data[1] = vec4(0.0f);