summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/skyF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl14
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/waterF.glsl8
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl12
4 files changed, 17 insertions, 19 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/skyF.glsl b/indra/newview/app_settings/shaders/class1/deferred/skyF.glsl
index 20a756530a..49ad064364 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/skyF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/skyF.glsl
@@ -61,6 +61,6 @@ void main()
/// Gamma correct for WL (soft clip effect).
frag_data[0] = vec4(scaleSoftClip(color.rgb), 1.0);
frag_data[1] = vec4(0.0,0.0,0.0,0.0);
- frag_data[2] = vec4(0.5,0.5,0.5,0);
+ frag_data[2] = vec4(0.5,0.5,0.0,0);
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
index aafa932b8f..064ec51028 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
@@ -297,7 +297,7 @@ void main()
vec4 spec = texture2DRect(specularRect, vary_fragcoord.xy);
vec3 col;
float bloom = 0.0;
- if (diffuse.a < 0.9)
+ //if (diffuse.a < 0.9)
{
calcAtmospherics(pos.xyz, 1.0);
@@ -322,23 +322,19 @@ void main()
col += spec_contrib;
}
+ col = mix(col.rgb, diffuse.rgb, diffuse.a);
+
if (envIntensity > 0.0)
{ //add environmentmap
vec3 env_vec = env_mat * refnormpersp;
col = mix(col.rgb, pow(textureCube(environmentMap, env_vec).rgb, vec3(2.2)) * 2.2,
- max(envIntensity-diffuse.a*2.0, 0.0));
+ envIntensity);
}
col = atmosLighting(col);
col = scaleSoftClip(col);
-
- col = mix(col.rgb, diffuse.rgb, diffuse.a);
}
- else
- {
- col = diffuse.rgb;
- }
-
+
frag_color.rgb = col;
//frag_color.a = bloom;
diff --git a/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl b/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl
index 3427d6db57..de858b34b5 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl
@@ -67,6 +67,12 @@ VARYING vec4 littleWave;
VARYING vec4 view;
VARYING vec4 vary_position;
+vec2 encode_normal(vec3 n)
+{
+ float f = sqrt(8 * n.z + 8);
+ return n.xy / f + 0.5;
+}
+
void main()
{
vec4 color;
@@ -161,5 +167,5 @@ void main()
frag_data[0] = vec4(color.rgb, 0.5); // diffuse
frag_data[1] = vec4(0.5,0.5,0.5, 0.95); // speccolor*spec, spec
- frag_data[2] = vec4(screenspacewavef.xyz*0.5+0.5, screenspacewavef.z*0.5); // normalxyz, displace
+ frag_data[2] = vec4(encode_normal(screenspacewavef), 0.0, 0.0); // normalxyz, displace
}
diff --git a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
index 3d39394c32..466714c108 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
@@ -300,7 +300,6 @@ void main()
vec3 col;
float bloom = 0.0;
- if (diffuse.a < 0.9)
{
vec4 spec = texture2DRect(specularRect, vary_fragcoord.xy);
@@ -331,22 +330,19 @@ void main()
col += spec_contrib;
}
+ col = mix(col, diffuse.rgb, diffuse.a);
+
if (envIntensity > 0.0)
{ //add environmentmap
vec3 env_vec = env_mat * refnormpersp;
col = mix(col.rgb, pow(textureCube(environmentMap, env_vec).rgb, vec3(2.2)) * 2.2,
- max(envIntensity-diffuse.a*2.0, 0.0));
+ envIntensity);
}
col = atmosLighting(col);
col = scaleSoftClip(col);
-
- col = mix(col, diffuse.rgb, diffuse.a);
- }
- else
- {
- col = diffuse.rgb;
}
+
frag_color.rgb = col;
frag_color.a = bloom;