diff options
Diffstat (limited to 'indra/newview/app_settings')
12 files changed, 37 insertions, 28 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl index dbd7abd7e5..b439fbbff6 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl @@ -223,8 +223,7 @@ void main() float ambient = da; ambient *= 0.5; ambient *= ambient; - //ambient = max(getAmbientClamp(), ambient); // keeps shadows dark - ambient = 1.0 - ambient; + ambient = min(getAmbientClamp(), 1.0 - ambient); vec3 sun_contrib = min(final_da, shadow) * sunlit; diff --git a/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl b/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl index 7533762a96..274d1818f0 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl @@ -320,8 +320,7 @@ void main() float ambient = da; ambient *= 0.5; ambient *= ambient; - //ambient = max(getAmbientClamp(), ambient); - ambient = 1.0 - ambient; + ambient = min(getAmbientClamp(), 1.0 - ambient); vec3 sun_contrib = min(final_da, shadow) * sunlit; diff --git a/indra/newview/app_settings/shaders/class1/deferred/shadowUtil.glsl b/indra/newview/app_settings/shaders/class1/deferred/shadowUtil.glsl index bea016300d..4134220306 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/shadowUtil.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/shadowUtil.glsl @@ -50,7 +50,7 @@ float pcfShadow(sampler2DShadow shadowMap, vec3 norm, vec4 stc, float bias_mul, { float offset = shadow_bias * bias_mul; stc.xyz /= stc.w; - stc.z += offset * 3.0; + stc.z += offset * 2.0; stc.x = floor(stc.x*shadow_res.x + fract(pos_screen.y*shadow_res.y))/shadow_res.x; // add some chaotic jitter to X sample pos according to Y to disguise the snapping going on here float cs = shadow2D(shadowMap, stc.xyz).x; float shadow = cs * 4.0; diff --git a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl index b6e3951ee3..2a24915ade 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl @@ -106,8 +106,7 @@ void main() float ambient = da; ambient *= 0.5; ambient *= ambient; - //ambient = max(getAmbientClamp(), ambient); - ambient = 1.0 - ambient; + ambient = min(getAmbientClamp(), 1.0 - ambient); vec3 sun_contrib = final_da * sunlit; diff --git a/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl b/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl index 8fea4e5d27..180f38b1e1 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl @@ -157,6 +157,6 @@ void main() vec3 screenspacewavef = normalize((norm_mat*vec4(wavef, 1.0)).xyz); frag_data[0] = vec4(color.rgb, 0); // diffuse - frag_data[1] = vec4(specular * 0.15, 0.5); // speccolor, spec + frag_data[1] = vec4(specular * 0.5, 0.5); // speccolor, spec frag_data[2] = vec4(encode_normal(screenspacewavef.xyz), 0.05, 0);// normalxy, 0, 0 } diff --git a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsFuncs.glsl b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsFuncs.glsl index 6788cc1f63..7f5ac00963 100644 --- a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsFuncs.glsl +++ b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsFuncs.glsl @@ -44,7 +44,7 @@ uniform float sun_moon_glow_factor; float getAmbientClamp() { - return 0.66f; + return 0.2f; } void calcAtmosphericVars(vec3 inPositionEye, float ambFactor, out vec3 sunlit, out vec3 amblit, out vec3 additive, out vec3 atten) { @@ -137,7 +137,7 @@ void calcAtmosphericVars(vec3 inPositionEye, float ambFactor, out vec3 sunlit, o + tmpAmbient)); //brightness of surface both sunlight and ambient - sunlit = sunlight.rgb * 0.5; - amblit = tmpAmbient.rgb * .25; + sunlit = sunlight.rgb; + amblit = tmpAmbient.rgb; additive *= vec3(1.0 - temp1); } diff --git a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl index 03e5143fca..39b13b46cc 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl @@ -116,8 +116,7 @@ void main() float ambient = da; ambient *= 0.5; ambient *= ambient; - //ambient = max(getAmbientClamp(), ambient); - ambient = 1.0 - ambient; + ambient = min(getAmbientClamp(), 1.0 - ambient); vec3 sun_contrib = min(scol, final_da) * sunlit; @@ -190,11 +189,10 @@ vec3 post_atmo = color.rgb; bloom = fogged.a; #endif +// srgb colorspace debuggables //color.rgb = amblit; -//color.rgb = vec3(ambient); //color.rgb = sunlit; //color.rgb = post_ambient; -//color.rgb = vec3(final_da); //color.rgb = sun_contrib; //color.rgb = post_sunlight; //color.rgb = diffuse_srgb.rgb; @@ -208,6 +206,11 @@ vec3 post_atmo = color.rgb; color.rgb = srgb_to_linear(color.rgb); } +// linear debuggables +//color.rgb = vec3(final_da); +//color.rgb = vec3(ambient); +//color.rgb = vec3(scol); + frag_color.rgb = color.rgb; frag_color.a = bloom; } diff --git a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsV.glsl b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsV.glsl index 4ac44feee5..d66983a951 100644 --- a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsV.glsl +++ b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsV.glsl @@ -22,8 +22,6 @@ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA * $/LicenseInfo$ */ - - // VARYING param funcs void setSunlitColor(vec3 v); diff --git a/indra/newview/app_settings/shaders/class2/windlight/transportF.glsl b/indra/newview/app_settings/shaders/class2/windlight/transportF.glsl index 2683b06e1b..2de708d94b 100644 --- a/indra/newview/app_settings/shaders/class2/windlight/transportF.glsl +++ b/indra/newview/app_settings/shaders/class2/windlight/transportF.glsl @@ -51,11 +51,11 @@ vec3 atmosTransport(vec3 light) vec3 fullbrightAtmosTransport(vec3 light) { float brightness = dot(light.rgb, vec3(0.33333)); - return atmosTransportFrag(light, getAdditiveColor() * (brightness * 0.5 + 0.5), getAtmosAttenuation()); + return atmosTransportFrag(light * 0.5, getAdditiveColor() * (brightness * 0.5 + 0.5), getAtmosAttenuation()); } vec3 fullbrightShinyAtmosTransport(vec3 light) { float brightness = dot(light.rgb, vec3(0.33333)); - return atmosTransportFrag(light, getAdditiveColor() * (brightness * 0.5 + 0.5), getAtmosAttenuation()); + return atmosTransportFrag(light * 0.5, getAdditiveColor() * (brightness * brightness), getAtmosAttenuation()); } diff --git a/indra/newview/app_settings/shaders/class3/lighting/lightV.glsl b/indra/newview/app_settings/shaders/class3/lighting/lightV.glsl index 48c883d98a..2f64ab25cb 100644 --- a/indra/newview/app_settings/shaders/class3/lighting/lightV.glsl +++ b/indra/newview/app_settings/shaders/class3/lighting/lightV.glsl @@ -32,7 +32,7 @@ vec4 sumLights(vec3 pos, vec3 norm, vec4 color); vec4 calcLighting(vec3 pos, vec3 norm, vec4 color) { vec4 c = sumLights(pos, norm, color); - c.rgb += atmosAmbient() * color.rgb; + c.rgb += atmosAmbient() * color.rgb * 0.25; return c; } diff --git a/indra/newview/app_settings/shaders/class3/windlight/atmosphericsF.glsl b/indra/newview/app_settings/shaders/class3/windlight/atmosphericsF.glsl index c0a0d4782d..88dfa8a907 100644 --- a/indra/newview/app_settings/shaders/class3/windlight/atmosphericsF.glsl +++ b/indra/newview/app_settings/shaders/class3/windlight/atmosphericsF.glsl @@ -37,22 +37,29 @@ uniform vec4 blue_density; uniform float haze_horizon; uniform float haze_density; uniform float cloud_shadow; +uniform float density_multiplier; +uniform float distance_multiplier; uniform float max_y; uniform vec4 glow; uniform float scene_light_strength; uniform mat3 ssao_effect_mat; +uniform int no_atmo; +uniform float sun_moon_glow_factor; vec3 scaleSoftClipFrag(vec3 light); vec3 atmosFragLighting(vec3 light, vec3 additive, vec3 atten) { - light *= atten.r; - light += additive; - return (2.0 * light); + if (no_atmo == 1) + { + return light; + } + light *= atten.r; + light += additive; + return light * 2.0; } vec3 atmosLighting(vec3 light) { return atmosFragLighting(light, getAdditiveColor(), getAtmosAttenuation()); } - diff --git a/indra/newview/app_settings/shaders/class3/windlight/transportF.glsl b/indra/newview/app_settings/shaders/class3/windlight/transportF.glsl index e7e56087ab..08eb119510 100644 --- a/indra/newview/app_settings/shaders/class3/windlight/transportF.glsl +++ b/indra/newview/app_settings/shaders/class3/windlight/transportF.glsl @@ -35,10 +35,12 @@ uniform int no_atmo; vec3 atmosTransportFrag(vec3 light, vec3 additive, vec3 atten) { if (no_atmo == 1) - { + { return light; } - return (light + additive) * atten * 2.0; + light *= atten.r; + light += additive; + return light * 2.0; } vec3 atmosTransport(vec3 light) @@ -48,10 +50,12 @@ vec3 atmosTransport(vec3 light) vec3 fullbrightAtmosTransport(vec3 light) { - return atmosTransportFrag(light, getAdditiveColor(), getAtmosAttenuation()); + float brightness = dot(light.rgb, vec3(0.33333)); + return atmosTransportFrag(light * 0.5, getAdditiveColor() * (brightness * 0.5 + 0.5), getAtmosAttenuation()); } vec3 fullbrightShinyAtmosTransport(vec3 light) { - return atmosTransportFrag(light, getAdditiveColor(), getAtmosAttenuation()); + float brightness = dot(light.rgb, vec3(0.33333)); + return atmosTransportFrag(light * 0.5, getAdditiveColor() * (brightness * brightness), getAtmosAttenuation()); } |