diff options
author | Geenz <geenz@geenzo.com> | 2013-04-24 05:16:02 -0400 |
---|---|---|
committer | Geenz <geenz@geenzo.com> | 2013-04-24 05:16:02 -0400 |
commit | fbbbb80752e91deff0bbaf5893210fddff53eb13 (patch) | |
tree | dd05e5753823a644a020b76d8860202a1cbfec10 /indra/newview | |
parent | 95672cabb98fb311010cf3ff5571b3422b4dec71 (diff) |
Fix for overbrigtened alpha blended objects in deferred. Linearize diffuse surface color in the vertex shader before passing it to the fragment shader.
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl index 4c26621a88..6a1bfd5bef 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl @@ -172,17 +172,19 @@ void main() //vec4 color = calcLighting(pos.xyz, norm, diffuse_color, vec4(0.)); vec4 col = vec4(0.0, 0.0, 0.0, diffuse_color.a); - vary_pointlight_col = diffuse_color.rgb; + vec3 diff = pow(diffuse_color.rgb, vec3(2.2)); + + vary_pointlight_col = diff; col.rgb = vec3(0,0,0); // Add windlight lights col.rgb = atmosAmbient(vec3(0.)); - vary_ambient = col.rgb*diffuse_color.rgb; + vary_ambient = col.rgb*diff; vary_directional.rgb = atmosAffectDirectionalLight(1); - col.rgb = col.rgb*diffuse_color.rgb; + col.rgb = col.rgb*diff; #if INDEX_MODE != NON_INDEXED_NO_COLOR vertex_color = col; #endif |