summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl')
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl17
1 files changed, 6 insertions, 11 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
index 2ec3fe4a52..2905cc91b6 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
@@ -77,11 +77,6 @@ vec3 vary_AtmosAttenuation;
uniform mat4 inv_proj;
uniform vec2 screen_res;
-vec3 samplesRGB(vec3 color)
-{
- return pow(color, vec3(2.2));
-}
-
vec4 getPosition_d(vec2 pos_screen, float depth)
{
vec2 sc = pos_screen.xy*2.0;
@@ -106,15 +101,15 @@ vec3 getPositionEye()
}
vec3 getSunlitColor()
{
- return samplesRGB(vary_SunlitColor) * 4.4;
+ return vary_SunlitColor;
}
vec3 getAmblitColor()
{
- return samplesRGB((vary_AmblitColor)) * 2.2;
+ return vary_AmblitColor;
}
vec3 getAdditiveColor()
{
- return samplesRGB(vary_AdditiveColor) * 2.2;
+ return vary_AdditiveColor;
}
vec3 getAtmosAttenuation()
{
@@ -305,7 +300,7 @@ void main()
//
vec3 refnormpersp = normalize(reflect(pos.xyz, norm.xyz));
float sa = dot(refnormpersp, sun_dir.xyz);
- vec3 dumbshiny = vary_SunlitColor*(texture2D(lightFunc, vec2(sa, spec.a)).r);
+ vec3 dumbshiny = vary_SunlitColor*(6 * texture2D(lightFunc, vec2(sa, spec.a)).r);
// add the two types of shiny together
vec3 spec_contrib = dumbshiny * spec.rgb;
@@ -314,8 +309,8 @@ void main()
//add environmentmap
vec3 env_vec = env_mat * refnormpersp;
- col = mix(col.rgb, samplesRGB(textureCube(environmentMap, env_vec).rgb) * 2.2,
- max(norm.a-diffuse.a*2.0, 0.0));
+ col = mix(col.rgb, textureCube(environmentMap, env_vec).rgb,
+ max(spec.a-diffuse.a*2.0, 0.0));
}
col = atmosLighting(col);