summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/materialF.glsl8
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl8
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl8
3 files changed, 12 insertions, 12 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl b/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl
index dabdf69681..0880a73b26 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl
@@ -357,10 +357,10 @@ vec3 post_diffuse = color.rgb;
if (nh > 0.0)
{
float scol = fres*texture2D(lightFunc, vec2(nh, spec.a)).r*gt/(nh*da);
- vec3 speccol = sun_contrib*scol*spec.rgb / 16.0f;
- speccol = clamp(speccol, vec3(0), vec3(1));
- bloom = dot(speccol, speccol);
- color += speccol;
+ vec3 sp = sun_contrib*scol / 16.0f;
+ sp = clamp(sp, vec3(0), vec3(1));
+ bloom = dot(sp, sp) / 6.0;
+ color += sp * spec.rgb;
}
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
index 4e8062977d..4a6dbc0313 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
@@ -143,10 +143,10 @@ vec3 post_diffuse = color.rgb;
if (nh > 0.0)
{
float scontrib = fres*texture2D(lightFunc, vec2(nh, spec.a)).r*gt/(nh*da);
- vec3 speccol = sun_contrib*scontrib*spec.rgb / 16.0f;
- speccol = clamp(speccol, vec3(0), vec3(1));
- bloom += dot(speccol, speccol);
- color += speccol;
+ vec3 sp = sun_contrib*scontrib / 16.0;
+ sp = clamp(sp, vec3(0), vec3(1));
+ bloom += dot(sp, sp) / 6.0;
+ color += sp * spec.rgb;
}
}
diff --git a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
index 5aaac382a5..1b2b835ad1 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
@@ -153,10 +153,10 @@ vec3 post_diffuse = color.rgb;
if (nh > 0.0)
{
float scontrib = fres*texture2D(lightFunc, vec2(nh, spec.a)).r*gt/(nh*da);
- vec3 speccol = sun_contrib*scontrib*spec.rgb / 16.0;
- speccol = clamp(speccol, vec3(0), vec3(1));
- bloom += dot (speccol, speccol);
- color += speccol;
+ vec3 sp = sun_contrib*scontrib / 16.0;
+ sp = clamp(sp, vec3(0), vec3(1));
+ bloom += dot (sp, sp) / 6.0;
+ color += sp * spec.rgb;
}
}