summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-04-23 13:37:03 +0100
committerTofu Linden <tofu.linden@lindenlab.com>2010-04-23 13:37:03 +0100
commitf972cc4be952abc943f9d289533c9951ce4dc839 (patch)
tree912654d1cb1fc57b62b52e4cc39e1807d12368f8 /indra/newview/app_settings
parent95ca4315e3791fd9748edb5fe0d76719de6854ae (diff)
Restore a bit of the non-deferred renderer's sun/moon waterglow in deferred rendering. This also adds a slight pinch of glow to shiny sun-spots. So be it.
(transplanted from 5a0d9e5b5cfb2ecd96685f0275ab8e999ab86263)
Diffstat (limited to 'indra/newview/app_settings')
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl4
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl4
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl4
3 files changed, 9 insertions, 3 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
index bf5dd4155c..65540ad6fe 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
@@ -270,6 +270,7 @@ void main()
vec2 scol_ambocc = texture2DRect(lightMap, vary_fragcoord.xy).rg;
float scol = max(scol_ambocc.r, diffuse.a);
float ambocc = scol_ambocc.g;
+ float glowresult = 0.0;
calcAtmospherics(pos.xyz, ambocc);
@@ -285,6 +286,7 @@ void main()
vec3 refnormpersp = normalize(reflect(pos.xyz, norm.xyz));
float sa = dot(refnormpersp, vary_light.xyz);
vec3 dumbshiny = vary_SunlitColor*scol_ambocc.r*texture2D(lightFunc, vec2(sa, spec.a)).a;
+ glowresult = 0.08 * dot(dumbshiny.rgb, spec.rgb);
// screen-space cheap fakey reflection map
//
@@ -334,5 +336,5 @@ void main()
col = scaleSoftClip(col);
gl_FragColor.rgb = col;
- gl_FragColor.a = 0.0;
+ gl_FragColor.a = glowresult;
}
diff --git a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
index 28cfc6322e..67ef3d5280 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
@@ -269,6 +269,7 @@ void main()
vec2 scol_ambocc = texture2DRect(lightMap, vary_fragcoord.xy).rg;
float scol = max(scol_ambocc.r, diffuse.a);
float ambocc = scol_ambocc.g;
+ float glowresult = 0.0;
calcAtmospherics(pos.xyz, ambocc);
@@ -284,6 +285,7 @@ void main()
vec3 refnormpersp = normalize(reflect(pos.xyz, norm.xyz));
float sa = dot(refnormpersp, vary_light.xyz);
vec3 dumbshiny = vary_SunlitColor*scol_ambocc.r*texture2D(lightFunc, vec2(sa, spec.a)).a;
+ glowresult = 0.08 * dot(dumbshiny.rgb, spec.rgb);
// screen-space cheap fakey reflection map
//
@@ -334,5 +336,5 @@ void main()
col = scaleSoftClip(col);
gl_FragColor.rgb = col;
- gl_FragColor.a = 0.0;
+ gl_FragColor.a = glowresult;
}
diff --git a/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl
index 9f94b9e8ea..b5c6693d3b 100644
--- a/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl
+++ b/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl
@@ -272,6 +272,7 @@ void main()
vec2 scol_ambocc = texture2DRect(lightMap, vary_fragcoord.xy).rg;
float scol = max(scol_ambocc.r, diffuse.a);
float ambocc = scol_ambocc.g;
+ float glowresult = 0.0;
calcAtmospherics(pos.xyz, ambocc);
@@ -287,6 +288,7 @@ void main()
vec3 refnormpersp = normalize(reflect(pos.xyz, norm.xyz));
float sa = dot(refnormpersp, vary_light.xyz);
vec3 dumbshiny = vary_SunlitColor*scol*texture2D(lightFunc, vec2(sa, spec.a)).a;
+ glowresult = 0.08 * dot(dumbshiny.rgb, spec.rgb);
// screen-space cheap fakey reflection map
//
@@ -340,7 +342,7 @@ void main()
gl_FragColor.rgb = col;
//gl_FragColor.rgb = gi_col.rgb;
- gl_FragColor.a = 0.0;
+ gl_FragColor.a = glowresult;
//gl_FragColor.rg = scol_ambocc.rg;
//gl_FragColor.rgb = texture2DRect(lightMap, vary_fragcoord.xy).rgb;