summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/app_settings/shaders')
-rwxr-xr-xindra/newview/app_settings/shaders/class1/deferred/alphaF.glsl8
-rwxr-xr-xindra/newview/app_settings/shaders/class1/deferred/waterF.glsl9
2 files changed, 7 insertions, 10 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
index 69b29269c7..2eef99dea7 100755
--- a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
@@ -288,8 +288,7 @@ void main()
diff.rgb = srgb_to_linear(diff.rgb);
#ifdef USE_VERTEX_COLOR
- diff.rgb *= vertex_color.rgb;
- float vertex_color_alpha = vertex_color.a;
+ float vertex_color_alpha = diff.a * vertex_color.a;
#else
float vertex_color_alpha = 1.0;
#endif
@@ -306,8 +305,9 @@ void main()
vec4 col = vec4(vary_ambient + dlight, vertex_color_alpha);
#endif
- vec4 color = gamma_diff * col;
-
+ vec4 color = col;
+ color.rgb *= gamma_diff.rgb;
+
color.rgb = atmosLighting(color.rgb);
color.rgb = scaleSoftClip(color.rgb);
diff --git a/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl b/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl
index 7415415290..34189deaad 100755
--- a/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl
@@ -186,16 +186,13 @@ void main()
color.rgb = atmosTransport(color.rgb);
color.rgb = scaleSoftClip(color.rgb);
- //color.a = spec * sunAngle2;
+ color.a = sunAngle2;
//wavef.z *= 0.1f;
//wavef = normalize(wavef);
vec3 screenspacewavef = (norm_mat*vec4(wavef, 1.0)).xyz;
- // 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[0] = vec4(color.rgb, color.a); // 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
+ frag_data[2] = vec4(encode_normal(screenspacewavef.xyz*0.5+0.5), screenspacewavef.z * 0.16, 0.0);// normalxyz, env intensity
}