summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class2/windlight
diff options
context:
space:
mode:
authorGeenz <geenz@geenzo.com>2013-04-29 14:15:59 -0400
committerGeenz <geenz@geenzo.com>2013-04-29 14:15:59 -0400
commit2a96a5f3eae9c0cf5a239a6734a8a656a71c2cb7 (patch)
tree9a489f4890ac34eed41602d3c45a79644113fab6 /indra/newview/app_settings/shaders/class2/windlight
parent4ae48c225b1bb82a5667757fea53ff5c0646a5c4 (diff)
Fix any missing color space conversions where appropriate, tweak the sun's intensity to match pre-gamma correction results, and also mask spotlight specular by the projected texture.
Diffstat (limited to 'indra/newview/app_settings/shaders/class2/windlight')
-rw-r--r--indra/newview/app_settings/shaders/class2/windlight/atmosphericsV.glsl12
1 files changed, 3 insertions, 9 deletions
diff --git a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsV.glsl b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsV.glsl
index d543479b85..c1eff73bc8 100644
--- a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsV.glsl
+++ b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsV.glsl
@@ -130,17 +130,11 @@ void calcAtmospherics(vec3 inPositionEye) {
vec3(blue_horizon * blue_weight * (sunlight*(1.-cloud_shadow) + tmpAmbient)
+ (haze_horizon * haze_weight) * (sunlight*(1.-cloud_shadow) * temp2.x
+ tmpAmbient)));
-
- float gammaScale = 1.0;
- if (global_gamma > 1.0)
- {
- gammaScale = global_gamma / 2 + global_gamma;
- }
//brightness of surface both sunlight and ambient
- setSunlitColor(pow(vec3(sunlight * .5), vec3(global_gamma)) * gammaScale);
- setAmblitColor(pow(vec3(tmpAmbient * .25), vec3(global_gamma)) * gammaScale);
- setAdditiveColor(pow(getAdditiveColor() * vec3(1.0 - temp1), vec3(global_gamma)) * gammaScale);
+ setSunlitColor(pow(vec3(sunlight * .5), vec3(global_gamma)) * global_gamma);
+ setAmblitColor(pow(vec3(tmpAmbient * .25), vec3(global_gamma)) * global_gamma);
+ setAdditiveColor(pow(getAdditiveColor() * vec3(1.0 - temp1), vec3(global_gamma)) * global_gamma);
// vary_SunlitColor = vec3(0);
// vary_AmblitColor = vec3(0);