diff options
author | Graham Linden <graham@lindenlab.com> | 2018-09-04 23:08:20 +0100 |
---|---|---|
committer | Graham Linden <graham@lindenlab.com> | 2018-09-04 23:08:20 +0100 |
commit | 2e55eae9cc6ebff303c8f322c71fec9c20e42bd8 (patch) | |
tree | ea4259bc673bbac6715cc0269a4cc6de3c8a9958 /indra/newview/app_settings/shaders/class1/deferred/starsF.glsl | |
parent | d1d248973d577d314bba16dc9f2977a7125b5f0d (diff) |
Merge and fix MAINT-9087 and MAINT-9084
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/deferred/starsF.glsl')
-rw-r--r-- | indra/newview/app_settings/shaders/class1/deferred/starsF.glsl | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/starsF.glsl b/indra/newview/app_settings/shaders/class1/deferred/starsF.glsl index d7f655709c..6c616db442 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/starsF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/starsF.glsl @@ -26,19 +26,26 @@ /*[EXTRA_CODE_HERE]*/ #ifdef DEFINE_GL_FRAGCOLOR -out vec4 frag_color; +out vec4 frag_data[3]; #else -#define frag_color gl_FragColor +#define frag_data gl_FragData #endif VARYING vec4 vertex_color; VARYING vec2 vary_texcoord0; +VARYING vec2 screenpos; uniform sampler2D diffuseMap; uniform sampler2D altDiffuseMap; uniform float blend_factor; uniform float custom_alpha; uniform vec4 sunlight_color; +uniform float time; + +float twinkle(){ + float d = fract(screenpos.x + screenpos.y); + return abs(d); +} void main() { @@ -46,6 +53,12 @@ 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 *= custom_alpha; - frag_color = col; + col.a = (col.a * custom_alpha) * 8.0f; + col.a += twinkle() * 2.0f; + col.a = max(0.0f, col.a); + + frag_data[0] = col; + frag_data[1] = vec4(0.0f); + frag_data[2] = vec4(0.0, 1.0, 0.0, 1.0); } + |