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.glsl25
-rwxr-xr-xindra/newview/app_settings/shaders/class1/deferred/impostorF.glsl4
-rwxr-xr-xindra/newview/app_settings/shaders/class1/lighting/lightAlphaMaskF.glsl4
3 files changed, 28 insertions, 5 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
index d0c7cc9dde..cd7a76db28 100755
--- a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
@@ -531,6 +531,10 @@ void main()
vec4 diff = texture2D(diffuseMap,vary_texcoord0.xy);
#endif
+#ifdef FOR_IMPOSTOR
+ vec4 color;
+ color.rgb = diff.rgb;
+
#ifdef USE_VERTEX_COLOR
float final_alpha = diff.a * vertex_color.a;
diff.rgb *= vertex_color.rgb;
@@ -538,6 +542,22 @@ void main()
float final_alpha = diff.a;
#endif
+ // Insure we don't pollute depth with invis pixels in impostor rendering
+ //
+ if (final_alpha < 0.01)
+ {
+ discard;
+ }
+#else
+
+#ifdef USE_VERTEX_COLOR
+ float final_alpha = diff.a * vertex_color.a;
+ diff.rgb *= vertex_color.rgb;
+#else
+ float final_alpha = diff.a;
+#endif
+
+
vec4 gamma_diff = diff;
diff.rgb = srgb_to_linear(diff.rgb);
@@ -567,11 +587,10 @@ void main()
ambient = (1.0-ambient);
color.rgb *= ambient;
-
color.rgb += atmosAffectDirectionalLight(final_da);
color.rgb *= gamma_diff.rgb;
- color.rgb = mix(diff.rgb, color.rgb, final_alpha);
+ //color.rgb = mix(diff.rgb, color.rgb, final_alpha);
color.rgb = atmosLighting(color.rgb);
color.rgb = scaleSoftClip(color.rgb);
@@ -602,6 +621,8 @@ void main()
color = applyWaterFogDeferred(pos.xyz, color);
#endif
+#endif
+
frag_color = color;
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/impostorF.glsl b/indra/newview/app_settings/shaders/class1/deferred/impostorF.glsl
index d1eaabf901..f8fdde43f9 100755
--- a/indra/newview/app_settings/shaders/class1/deferred/impostorF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/impostorF.glsl
@@ -86,7 +86,9 @@ void main()
vec4 norm = texture2D(normalMap, vary_texcoord0.xy);
vec4 spec = texture2D(specularMap, vary_texcoord0.xy);
- frag_data[0] = vec4(col.rgb, col.a);
+ col.rgb = linear_to_srgb(col.rgb);
+
+ frag_data[0] = vec4(col.rgb, 0.0);
frag_data[1] = spec;
frag_data[2] = vec4(norm.xy,0,0);
}
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightAlphaMaskF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightAlphaMaskF.glsl
index eaaa7b208d..cad5b9ff04 100755
--- a/indra/newview/app_settings/shaders/class1/lighting/lightAlphaMaskF.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightAlphaMaskF.glsl
@@ -41,13 +41,13 @@ void default_lighting()
{
vec4 color = diffuseLookup(vary_texcoord0.xy);
+ color *= vertex_color;
+
if (color.a < minimum_alpha)
{
discard;
}
- color.rgb *= vertex_color.rgb;
-
color.rgb = atmosLighting(color.rgb);
color.rgb = scaleSoftClip(color.rgb);