diff options
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/deferred/starsF.glsl')
-rw-r--r-- | indra/newview/app_settings/shaders/class1/deferred/starsF.glsl | 33 |
1 files changed, 28 insertions, 5 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/starsF.glsl b/indra/newview/app_settings/shaders/class1/deferred/starsF.glsl index 821058804c..bac79a9fdc 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/starsF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/starsF.glsl @@ -23,6 +23,8 @@ * $/LicenseInfo$ */ +/*[EXTRA_CODE_HERE]*/ + #ifdef DEFINE_GL_FRAGCOLOR out vec4 frag_data[3]; #else @@ -31,14 +33,35 @@ out vec4 frag_data[3]; 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 float time; + +float twinkle(){ + float d = fract(screenpos.x + screenpos.y); + return abs(d); +} void main() { - vec4 col = vertex_color * texture2D(diffuseMap, vary_texcoord0.xy); - - frag_data[0] = col; - frag_data[1] = vec4(0,0,0,0); - frag_data[2] = vec4(0,0,1,0); + vec4 col_a = texture2D(diffuseMap, vary_texcoord0.xy); + vec4 col_b = texture2D(diffuseMap, vary_texcoord0.xy); + vec4 col = mix(col_b, col_a, blend_factor); + col.rgb *= vertex_color.rgb; + + 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); + frag_data[2] = vec4(0.0, 1.0, 0.0, 1.0); + + gl_FragDepth = 0.99995f; } + |