From 4102d3fb06c42846796cccb39a03d520c90b325c Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Thu, 25 Apr 2013 16:03:19 -0500 Subject: NORSPEC-106 Fix for emissive mask overriding environment mask. --- .../newview/app_settings/shaders/class1/deferred/skyF.glsl | 2 +- .../app_settings/shaders/class1/deferred/softenLightF.glsl | 14 +++++--------- .../app_settings/shaders/class1/deferred/waterF.glsl | 8 +++++++- 3 files changed, 13 insertions(+), 11 deletions(-) (limited to 'indra/newview/app_settings/shaders/class1/deferred') 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 } -- cgit v1.2.3 From 8bf4f1591114f135c64bee5cb9cb5e67bbcf8acd Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Thu, 25 Apr 2013 17:15:47 -0500 Subject: NORSPEC-104 Fix for texture animation sometimes not overriding specular and normal map texture coordinates. --- indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/newview/app_settings/shaders/class1/deferred') diff --git a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl index 064ec51028..90cf085524 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl @@ -297,7 +297,6 @@ void main() vec4 spec = texture2DRect(specularRect, vary_fragcoord.xy); vec3 col; float bloom = 0.0; - //if (diffuse.a < 0.9) { calcAtmospherics(pos.xyz, 1.0); -- cgit v1.2.3