summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2019-01-24 11:48:04 -0800
committerGraham Linden <graham@lindenlab.com>2019-01-24 11:48:04 -0800
commita6f92d8190e8771d6a3372eb456dbb97c7ca0c8d (patch)
treec9461754ba9f5b22319c8206074bb8fb1f054ac3 /indra/newview/app_settings/shaders
parentec8140016b991d2729b51dd1746a29fafaea5b61 (diff)
SL-10281
Use clamp on dot product of view and light norm to eliminate 2nd halo.
Diffstat (limited to 'indra/newview/app_settings/shaders')
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/skyF.glsl5
1 files changed, 3 insertions, 2 deletions
diff --git a/indra/newview/app_settings/shaders/class2/deferred/skyF.glsl b/indra/newview/app_settings/shaders/class2/deferred/skyF.glsl
index 520bfbeadc..09ad6e70d6 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/skyF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/skyF.glsl
@@ -70,14 +70,15 @@ uniform float ice_level;
vec3 rainbow(float d)
{
- d = clamp(d, -1, 0);
+ d = clamp(d, -1.0, 0.0);
float rad = (droplet_radius - 5.0f) / 1024.0f;
return pow(texture2D(rainbow_map, vec2(rad, d)).rgb, vec3(1.8)) * moisture_level;
}
vec3 halo22(float d)
{
- float v = sqrt(max(0, 1 - (d*d)));
+ d = clamp(d, 0.1, 1.0);
+ float v = sqrt(clamp(1 - (d * d), 0, 1));
return texture2D(halo_map, vec2(0, v)).rgb * ice_level;
}