diff options
Diffstat (limited to 'indra/newview/app_settings/shaders/class2')
-rw-r--r-- | indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl | 15 | ||||
-rw-r--r-- | indra/newview/app_settings/shaders/class2/deferred/pbralphaF.glsl | 10 |
2 files changed, 18 insertions, 7 deletions
diff --git a/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl b/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl index bc13e7d1ec..e3290e5e3c 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl @@ -163,7 +163,10 @@ vec3 calcPointLightOrSpotLight(vec3 light_col, vec3 diffuse, vec3 v, vec3 n, vec // no spec for alpha shader... } - col = max(col, vec3(0)); + float final_scale = 1.0; + if (classic_mode > 0) + final_scale = 0.9; + col = max(col * final_scale, vec3(0)); return col; } @@ -241,7 +244,8 @@ void main() vec3 atten; calcAtmosphericVarsLinear(pos.xyz, norm, light_dir, sunlit, amblit, additive, atten); - + if (classic_mode > 0) + sunlit *= 1.35; vec3 sunlit_linear = sunlit; vec3 amblit_linear = amblit; @@ -296,11 +300,14 @@ void main() color.rgb = applySkyAndWaterFog(pos.xyz, additive, atten, color).rgb; #endif // #else // FOR_IMPOSTOR - + float final_scale = 1; + if (classic_mode > 0) + final_scale = 1.1; #ifdef IS_HUD color.rgb = linear_to_srgb(color.rgb); + final_scale = 1; #endif - frag_color = max(color, vec4(0)); + frag_color = max(color * final_scale, vec4(0)); } diff --git a/indra/newview/app_settings/shaders/class2/deferred/pbralphaF.glsl b/indra/newview/app_settings/shaders/class2/deferred/pbralphaF.glsl index cec844559f..0418f99459 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/pbralphaF.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/pbralphaF.glsl @@ -43,6 +43,7 @@ uniform sampler2D lightMap; uniform int sun_up_factor; uniform vec3 sun_dir; uniform vec3 moon_dir; +uniform int classic_mode; out vec4 frag_color; @@ -160,7 +161,8 @@ void main() vec3 additive; vec3 atten; calcAtmosphericVarsLinear(pos.xyz, norm, light_dir, sunlit, amblit, additive, atten); - + if (classic_mode > 0) + sunlit *= 1.35; vec3 sunlit_linear = sunlit; vec2 frag = vary_fragcoord.xy/vary_fragcoord.z*0.5+0.5; @@ -212,8 +214,10 @@ void main() color.rgb = applySkyAndWaterFog(pos.xyz, additive, atten, vec4(color, 1.0)).rgb; float a = basecolor.a*vertex_color.a; - - frag_color = max(vec4(color.rgb,a), vec4(0)); + float final_scale = 1; + if (classic_mode > 0) + final_scale = 1.1; + frag_color = max(vec4(color.rgb * final_scale,a), vec4(0)); } #else |