summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/app_settings')
-rwxr-xr-xindra/newview/app_settings/shaders/class1/deferred/alphaF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/fullbrightAlphaMaskF.glsl7
-rwxr-xr-xindra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl5
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/materialF.glsl12
-rwxr-xr-xindra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl13
-rwxr-xr-xindra/newview/app_settings/shaders/class1/deferred/waterF.glsl5
-rwxr-xr-xindra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl16
7 files changed, 37 insertions, 23 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
index 640e273415..b64852f17b 100755
--- a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
@@ -281,7 +281,7 @@ void main()
color.rgb += diff.rgb * vary_pointlight_col_linear * col.rgb;
color.rgb = linear_to_srgb(color.rgb);
-
+ //color.rgb = vec3(1,0,1);
frag_color = color;
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/fullbrightAlphaMaskF.glsl b/indra/newview/app_settings/shaders/class1/deferred/fullbrightAlphaMaskF.glsl
index 3d93583e1e..a74256de81 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/fullbrightAlphaMaskF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/fullbrightAlphaMaskF.glsl
@@ -71,7 +71,8 @@ void main()
vec4 color = texture2D(diffuseMap, vary_texcoord0.xy);
#endif
- if (color.a < minimum_alpha)
+ float final_alpha = color.a * vertex_color.a;
+ if (final_alpha < minimum_alpha)
{
discard;
}
@@ -83,8 +84,8 @@ void main()
color.rgb = fullbrightScaleSoftClip(color.rgb);
color.rgb = linear_to_srgb(color.rgb);
-
+ //color.rgb = vec3(1,0,1);
frag_color.rgb = color.rgb;
- frag_color.a = color.a;
+ frag_color.a = final_alpha;
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl
index 33c07a6e08..5876efedec 100755
--- a/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl
@@ -69,14 +69,15 @@ void main()
vec4 color = texture2D(diffuseMap, vary_texcoord0.xy);
#endif
- color.rgb *= vertex_color.rgb;
+
color.rgb = srgb_to_linear(color.rgb);
+ color.rgb *= vertex_color.rgb;
color.rgb = fullbrightAtmosTransport(color.rgb);
color.rgb = fullbrightScaleSoftClip(color.rgb);
color.rgb = linear_to_srgb(color.rgb);
-
+ //color.rgb = vec3(1,0,1);
frag_color.rgb = color.rgb;
frag_color.a = color.a;
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl b/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl
index 9ce4d89df7..954a27b698 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl
@@ -266,6 +266,13 @@ vec4 getPosition_d(vec2 pos_screen, float depth)
return pos;
}
+#ifndef WATER_FOG
+vec3 getPositionEye()
+{
+ return vary_PositionEye;
+}
+#endif
+
vec3 getSunlitColor()
{
return vary_SunlitColor;
@@ -728,6 +735,10 @@ void main()
glare = min(glare, 1.0);
float al = max(diffcol.a,glare)*vertex_color.a;
+
+ //convert to gamma space for display on screen
+ col.rgb = linear_to_srgb(col.rgb);
+
#ifdef WATER_FOG
vec4 temp = applyWaterFogDeferred(pos, vec4(col.rgb, al));
col.rgb = temp.rgb;
@@ -738,6 +749,7 @@ void main()
frag_color.a = al;
#else
+ //final_color.rgb = vec3(1,0,1);
frag_data[0] = final_color;
frag_data[1] = final_specular; // XYZ = Specular color. W = Specular exponent.
frag_data[2] = final_normal; // XY = Normal. Z = Env. intensity.
diff --git a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
index 953f0189f0..950512a79d 100755
--- a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
@@ -436,16 +436,15 @@ void main()
if (norm.w < 0.5)
{
col = mix(atmosLighting(col), fullbrightAtmosTransport(col), diffuse.a);
-
- #ifdef WATER_FOG
- vec4 fogged = applyWaterFogDeferred(pos,vec4(col, bloom));
- col = fogged.rgb;
- bloom = fogged.a;
- #endif
-
col = mix(scaleSoftClip(col), fullbrightScaleSoftClip(col), diffuse.a);
}
+ #ifdef WATER_FOG
+ vec4 fogged = applyWaterFogDeferred(pos,vec4(col, bloom));
+ col = fogged.rgb;
+ bloom = fogged.a;
+ #endif
+
col = srgb_to_linear(col);
//col = vec3(1,0,1);
diff --git a/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl b/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl
index 17288873c8..7415415290 100755
--- a/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl
@@ -192,7 +192,10 @@ void main()
//wavef = normalize(wavef);
vec3 screenspacewavef = (norm_mat*vec4(wavef, 1.0)).xyz;
- frag_data[0] = vec4(linear_to_srgb(color.rgb), 0.5); // diffuse
+ // this is needed for materials in reflections, but not otherwise
+ //
+ //frag_data[0] = vec4(linear_to_srgb(color.rgb), 0.5); // diffuse
+ 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(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 9b72c5b57d..0c71b4f554 100755
--- a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
@@ -455,23 +455,21 @@ void main()
if (norm.w < 0.5)
{
col = mix(atmosLighting(col), fullbrightAtmosTransport(col), diffuse.a);
-
- #ifdef WATER_FOG
- vec4 fogged = applyWaterFogDeferred(pos,vec4(col, bloom));
- col = fogged.rgb;
- bloom = fogged.a;
- #endif
-
col = mix(scaleSoftClip(col), fullbrightScaleSoftClip(col), diffuse.a);
}
+ #ifdef WATER_FOG
+ vec4 fogged = applyWaterFogDeferred(pos,vec4(col, bloom));
+ col = fogged.rgb;
+ bloom = fogged.a;
+ #endif
+
col = srgb_to_linear(col);
//col = vec3(1,0,1);
//col.g = envIntensity;
}
-
+
frag_color.rgb = col;
frag_color.a = bloom;
}
-