diff options
Diffstat (limited to 'indra/newview')
5 files changed, 15 insertions, 11 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl b/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl index 0459b39bd9..2235ab12a4 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl @@ -153,24 +153,25 @@ void main() spec = pow(spec, 128.0); //figure out distortion vector (ripply) - vec2 distort2 = distort+wavef.xy*(refScale*0.01)/max(dmod*df1, 1.0); + vec2 distort2 = distort+wavef.xy*refScale/max(dmod*df1, 1.0); vec4 fb = texture2D(screenTex, distort2); //mix with reflection // Note we actually want to use just df1, but multiplying by 0.999999 gets around an nvidia compiler bug - color.rgb = mix(fb.rgb, refcol.rgb, df1 * 0.3 + 0.7); + color.rgb = mix(fb.rgb, refcol.rgb, df1 * 0.4 + 0.6); vec4 pos = vary_position; color.rgb += spec * specular; - color.rgb = atmosTransport(color.rgb); + //color.rgb = atmosTransport(color.rgb); color.rgb = scaleSoftClip(color.rgb); - color.a = spec * sunAngle2 * 0.88; + color.a = spec * sunAngle2; + vec3 screenspacewavef = normalize((norm_mat*vec4(wavef, 1.0)).xyz); - + frag_data[0] = vec4(color.rgb, color); // diffuse frag_data[1] = vec4(0); // speccolor, spec frag_data[2] = vec4(encode_normal(screenspacewavef.xyz*0.5+0.5), 0.05, 0);// normalxy, 0, 0 diff --git a/indra/newview/app_settings/shaders/class1/environment/terrainWaterF.glsl b/indra/newview/app_settings/shaders/class1/environment/terrainWaterF.glsl index 3b0c81fc71..ddbe3ebe10 100644 --- a/indra/newview/app_settings/shaders/class1/environment/terrainWaterF.glsl +++ b/indra/newview/app_settings/shaders/class1/environment/terrainWaterF.glsl @@ -59,7 +59,10 @@ void main() vec4 outColor = mix( mix(color3, color2, alpha2), mix(color1, color0, alpha1), alphaFinal ); /// Add WL Components - outColor.rgb = atmosLighting(outColor.rgb * vertex_color.rgb); + outColor.rgb *= vertex_color.rgb; + + // SL-11260... + //outColor.rgb = atmosLighting(outColor.rgb); outColor = applyWaterFog(outColor); frag_color = outColor; diff --git a/indra/newview/app_settings/shaders/class1/environment/waterF.glsl b/indra/newview/app_settings/shaders/class1/environment/waterF.glsl index 043815c824..f033c0e7c4 100644 --- a/indra/newview/app_settings/shaders/class1/environment/waterF.glsl +++ b/indra/newview/app_settings/shaders/class1/environment/waterF.glsl @@ -121,7 +121,6 @@ void main() vec4 refcol = refcol1 + refcol2 + refcol3; float df1 = df.x + df.y + df.z; - df1 *= 0.3333; refcol *= df1; vec3 wavef = (wave1 + wave2 * 0.4 + wave3 * 0.6) * 0.5; @@ -151,11 +150,11 @@ void main() //mix with reflection // Note we actually want to use just df1, but multiplying by 0.999999 gets around and nvidia compiler bug - color.rgb = mix(fb.rgb, refcol.rgb, df1 + 0.6); + color.rgb = mix(fb.rgb, refcol.rgb, df1 * 0.4 + 0.6); color.rgb += spec * specular; - color.rgb = atmosTransport(color.rgb); - color.rgb = scaleSoftClip(color.rgb); + //color.rgb = atmosTransport(color.rgb); + color.rgb = scaleSoftClip(color.rgb * 0.5); color.a = spec * sunAngle2; #if defined(WATER_EDGE) diff --git a/indra/newview/app_settings/shaders/class2/windlight/skyF.glsl b/indra/newview/app_settings/shaders/class2/windlight/skyF.glsl index 28d185b9af..02e10b7b50 100644 --- a/indra/newview/app_settings/shaders/class2/windlight/skyF.glsl +++ b/indra/newview/app_settings/shaders/class2/windlight/skyF.glsl @@ -50,7 +50,6 @@ void main() vec4 color; color = vary_HazeColor; color *= 2.; - /// Gamma correct for WL (soft clip effect). frag_color.rgb = scaleSoftClip(color.rgb); frag_color.a = 1.0; diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp index 33572deebc..c77a631554 100644 --- a/indra/newview/llviewershadermgr.cpp +++ b/indra/newview/llviewershadermgr.cpp @@ -1095,6 +1095,7 @@ BOOL LLViewerShaderMgr::loadShadersWater() gWaterProgram.mFeatures.calculatesAtmospherics = true; gWaterProgram.mFeatures.hasGamma = true; gWaterProgram.mFeatures.hasTransport = true; + gWaterProgram.mFeatures.hasSrgb = true; gWaterProgram.mShaderFiles.clear(); gWaterProgram.mShaderFiles.push_back(make_pair("environment/waterV.glsl", GL_VERTEX_SHADER_ARB)); gWaterProgram.mShaderFiles.push_back(make_pair("environment/waterF.glsl", GL_FRAGMENT_SHADER_ARB)); @@ -1111,6 +1112,7 @@ BOOL LLViewerShaderMgr::loadShadersWater() gWaterEdgeProgram.mFeatures.calculatesAtmospherics = true; gWaterEdgeProgram.mFeatures.hasGamma = true; gWaterEdgeProgram.mFeatures.hasTransport = true; + gWaterEdgeProgram.mFeatures.hasSrgb = true; gWaterEdgeProgram.mShaderFiles.clear(); gWaterEdgeProgram.mShaderFiles.push_back(make_pair("environment/waterV.glsl", GL_VERTEX_SHADER_ARB)); gWaterEdgeProgram.mShaderFiles.push_back(make_pair("environment/waterF.glsl", GL_FRAGMENT_SHADER_ARB)); |