diff options
Diffstat (limited to 'indra')
4 files changed, 12 insertions, 12 deletions
diff --git a/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl b/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl index e9f849a8c0..7357e27117 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl @@ -147,7 +147,7 @@ vec3 calcPointLightOrSpotLight(vec3 light_col, vec3 diffuse, vec3 v, vec3 n, vec float lit = 0.0f; float amb_da = 0.0;//ambiance; - if (da > 0) + if (da > 0.0) { lit = max(da * dist_atten,0.0); col = lit * light_col * diffuse; diff --git a/indra/newview/app_settings/shaders/class3/deferred/multiPointLightF.glsl b/indra/newview/app_settings/shaders/class3/deferred/multiPointLightF.glsl index 4ed778371f..d001df3a59 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/multiPointLightF.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/multiPointLightF.glsl @@ -147,10 +147,10 @@ void main() if (spec.a > 0.0) { lit = min(nl * 6.0, 1.0) * dist_atten; - float fres = pow(1 - vh, 5) * 0.4 + 0.5; + float fres = pow(1.0 - vh, 5.0) * 0.4 + 0.5; - float gtdenom = 2 * nh; - float gt = max(0, min(gtdenom * nv / vh, gtdenom * nl / vh)); + float gtdenom = 2.0 * nh; + float gt = max(0.0, min(gtdenom * nv / vh, gtdenom * nl / vh)); if (nh > 0.0) { diff --git a/indra/newview/app_settings/shaders/class3/deferred/pointLightF.glsl b/indra/newview/app_settings/shaders/class3/deferred/pointLightF.glsl index 6c13757149..69792a8741 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/pointLightF.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/pointLightF.glsl @@ -124,9 +124,9 @@ void main() lit = min(nl*6.0, 1.0) * dist_atten; float sa = nh; - float fres = pow(1 - vh, 5) * 0.4+0.5; - float gtdenom = 2 * nh; - float gt = max(0,(min(gtdenom * nv / vh, gtdenom * nl / vh))); + float fres = pow(1.0 - vh, 5.0) * 0.4+0.5; + float gtdenom = 2.0 * nh; + float gt = max(0.0,(min(gtdenom * nv / vh, gtdenom * nl / vh))); if (nh > 0.0) { diff --git a/indra/newview/app_settings/shaders/class3/deferred/spotLightF.glsl b/indra/newview/app_settings/shaders/class3/deferred/spotLightF.glsl index bc4d36d10d..6ba42d7967 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/spotLightF.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/spotLightF.glsl @@ -188,7 +188,7 @@ void main() proj_tc.x > 0.0 && proj_tc.y > 0.0) { - float amb_da = 0; + float amb_da = 0.0; float lit = 0.0; if (nl > 0.0) @@ -211,10 +211,10 @@ void main() { dlit *= min(nl*6.0, 1.0) * dist_atten; - float fres = pow(1 - vh, 5)*0.4+0.5; + float fres = pow(1.0 - vh, 5.0)*0.4+0.5; - float gtdenom = 2 * nh; - float gt = max(0, min(gtdenom * nv / vh, gtdenom * nl / vh)); + float gtdenom = 2.0 * nh; + float gt = max(0.0, min(gtdenom * nv / vh, gtdenom * nl / vh)); if (nh > 0.0) { @@ -248,7 +248,7 @@ void main() stc.x > 0.0 && stc.y > 0.0) { - final_color += color.rgb * texture2DLodSpecular(stc.xy, (1 - spec.a) * (proj_lod * 0.6)).rgb * shadow * envIntensity; + final_color += color.rgb * texture2DLodSpecular(stc.xy, (1.0 - spec.a) * (proj_lod * 0.6)).rgb * shadow * envIntensity; } } } |