diff options
Diffstat (limited to 'indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl')
-rw-r--r-- | indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl index e95991a635..ff20b63972 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl @@ -79,11 +79,6 @@ vec3 vary_AmblitColor; vec3 vary_AdditiveColor; vec3 vary_AtmosAttenuation; -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; @@ -108,15 +103,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() { @@ -314,7 +309,7 @@ void main() // vec3 refnormpersp = normalize(reflect(pos.xyz, norm.xyz)); float sa = dot(refnormpersp, sun_dir.xyz); - vec3 dumbshiny = vary_SunlitColor*scol_ambocc.r*(texture2D(lightFunc, vec2(sa, spec.a)).r); + vec3 dumbshiny = vary_SunlitColor*scol_ambocc.r*(6 * texture2D(lightFunc, vec2(sa, spec.a)).r); // add the two types of shiny together vec3 spec_contrib = dumbshiny * spec.rgb; @@ -323,7 +318,7 @@ void main() //add environmentmap vec3 env_vec = env_mat * refnormpersp; - col = mix(col.rgb, samplesRGB(textureCube(environmentMap, env_vec).rgb) * 2.2, + col = mix(col.rgb, textureCube(environmentMap, env_vec).rgb, max(norm.a-diffuse.a*2.0, 0.0)); } |