summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/app_settings')
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/shadowUtil.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/waterF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl8
-rw-r--r--indra/newview/app_settings/shaders/class2/windlight/atmosphericsV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class2/windlight/transportF.glsl4
-rw-r--r--indra/newview/app_settings/shaders/class3/windlight/atmosphericsF.glsl15
-rw-r--r--indra/newview/app_settings/shaders/class3/windlight/transportF.glsl12
7 files changed, 29 insertions, 16 deletions
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/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/class2/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
index 03e5143fca..e41b4b99a3 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
@@ -190,11 +190,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 +207,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/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());
}