summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class1/deferred
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/deferred')
-rwxr-xr-xindra/newview/app_settings/shaders/class1/deferred/alphaF.glsl19
-rwxr-xr-xindra/newview/app_settings/shaders/class1/deferred/impostorF.glsl2
2 files changed, 19 insertions, 2 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..f35ff25dcb 100755
--- a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
@@ -531,6 +531,19 @@ void main()
vec4 diff = texture2D(diffuseMap,vary_texcoord0.xy);
#endif
+#if FOR_IMPOSTOR
+ vec4 color;
+ color.rgb = diff.rgb;
+ color.a = diff.a;
+
+ // Insure we don't pollute depth with invis pixels in impostor rendering
+ //
+ if (color.a < 0.01)
+ {
+ discard;
+ }
+#else
+
#ifdef USE_VERTEX_COLOR
float final_alpha = diff.a * vertex_color.a;
diff.rgb *= vertex_color.rgb;
@@ -538,6 +551,7 @@ void main()
float final_alpha = diff.a;
#endif
+
vec4 gamma_diff = diff;
diff.rgb = srgb_to_linear(diff.rgb);
@@ -567,11 +581,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 +615,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..506323fdce 100755
--- a/indra/newview/app_settings/shaders/class1/deferred/impostorF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/impostorF.glsl
@@ -86,6 +86,8 @@ void main()
vec4 norm = texture2D(normalMap, vary_texcoord0.xy);
vec4 spec = texture2D(specularMap, vary_texcoord0.xy);
+ col.rgb = linear_to_srgb(col.rgb);
+
frag_data[0] = vec4(col.rgb, col.a);
frag_data[1] = spec;
frag_data[2] = vec4(norm.xy,0,0);