summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2019-05-16 09:23:07 -0700
committerGraham Linden <graham@lindenlab.com>2019-05-16 09:23:07 -0700
commitcce6254aec2de6606b4940d961cef6cceb549d61 (patch)
tree8e7622754be499e731199a4b660f6f8c4f032088 /indra
parent8d30b644f2a9620e361ead27367e49ce700d318e (diff)
SL-11085
Modify new spec response to better match old gloss response curve. Tuned at 255, 192, 160, 128, 64, and 32 glossiness.
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;
}
}