diff options
-rw-r--r-- | indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl | 7 | ||||
-rw-r--r-- | indra/newview/app_settings/shaders/class1/deferred/materialF.glsl | 3 |
2 files changed, 5 insertions, 5 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl index c4d89f29f6..2112fa8251 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl @@ -136,9 +136,9 @@ vec3 calcPointLightOrSpotLight(vec3 light_col, vec3 diffuse, vec3 v, vec3 n, vec col = lit * light_col * diffuse; amb_da += (da*0.5+0.5) * ambiance; amb_da += (da*da*0.5 + 0.5) * ambiance; - amb_da *= dist_atten; - amb_da = min(amb_da, 1.0f - lit); } + amb_da *= dist_atten; + amb_da = min(amb_da, 1.0f - lit); col.rgb += amb_da * 0.5 * light_col * diffuse; // no spec for alpha shader... @@ -240,7 +240,7 @@ vec3 post_sunlight = color.rgb; vec3 post_diffuse = color.rgb; - //color.rgb = mix(diffuse_srgb.rgb, color.rgb, final_alpha); + //color.rgb = mix(diffuse_linear.rgb, color.rgb, final_alpha); color.rgb = atmosFragLighting(color.rgb, additive, atten); color.rgb = scaleSoftClipFrag(color.rgb); @@ -268,7 +268,6 @@ vec3 post_atmo = color.rgb; // back to sRGB as we're going directly to the final RT post-deferred gamma correction color.rgb = linear_to_srgb(color.rgb); - //color.rgb = amblit; //color.rgb = vec3(ambient); //color.rgb = sunlit; diff --git a/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl b/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl index 64cdacd4a2..ba1f121bfd 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl @@ -144,8 +144,9 @@ vec3 calcPointLightOrSpotLight(vec3 light_col, vec3 npos, vec3 diffuse, vec4 spe col = light_col*lit*diffuse; amb_da += (da*0.5 + 0.5) * ambiance; amb_da += (da*da*0.5+0.5) * ambiance; - amb_da = min(amb_da, 1.0f - lit); } + amb_da *= dist_atten; + amb_da = min(amb_da, 1.0f - lit); col.rgb += amb_da * 0.25 * light_col * diffuse; if (spec.a > 0.0) |