diff options
author | Graham Linden <graham@lindenlab.com> | 2018-07-10 18:23:02 +0100 |
---|---|---|
committer | Graham Linden <graham@lindenlab.com> | 2018-07-10 18:23:02 +0100 |
commit | 4fde1adbcf7d79bc4e80078c2f553b8ec020a1c3 (patch) | |
tree | ca1ca17a2e8b90494e018bd64402f0ad7874b36d /indra/newview/app_settings/shaders/class1/deferred | |
parent | cafea5d9bb80669509597c6f2ee180ac29c687ab (diff) |
Fix star rendering issues in ALM.
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/deferred')
-rw-r--r-- | indra/newview/app_settings/shaders/class1/deferred/cloudsF.glsl | 4 | ||||
-rw-r--r-- | indra/newview/app_settings/shaders/class1/deferred/starsF.glsl | 4 |
2 files changed, 7 insertions, 1 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/cloudsF.glsl b/indra/newview/app_settings/shaders/class1/deferred/cloudsF.glsl index 1a4cdff23d..3f81e3b0af 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/cloudsF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/cloudsF.glsl @@ -94,6 +94,10 @@ void main() alpha1 = 1. - alpha1 * alpha1; alpha1 = 1. - alpha1 * alpha1; + if (alpha1 < 0.001f) + { + discard; + } // Compute alpha2, for self shadowing effect // (1 - alpha2) will later be used as percentage of incoming sunlight diff --git a/indra/newview/app_settings/shaders/class1/deferred/starsF.glsl b/indra/newview/app_settings/shaders/class1/deferred/starsF.glsl index 9260075262..7f55d020d4 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/starsF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/starsF.glsl @@ -36,10 +36,12 @@ VARYING vec2 vary_texcoord0; uniform sampler2D diffuseMap; uniform float custom_alpha; +uniform vec4 sunlight_color; void main() { - vec4 col = vertex_color * texture2D(diffuseMap, vary_texcoord0.xy); + vec4 col = texture2D(diffuseMap, vary_texcoord0.xy); + col.rgb *= vertex_color.rgb; col.a *= custom_alpha; frag_color = col; } |