diff options
Diffstat (limited to 'indra')
5 files changed, 21 insertions, 21 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/materialF.glsl b/indra/newview/app_settings/shaders/class3/deferred/materialF.glsl index 5ee9aea09d..3276683f50 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/materialF.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/materialF.glsl @@ -136,7 +136,7 @@ vec3 calcPointLightOrSpotLight(vec3 light_col, vec3 npos, vec3 diffuse, vec4 spe float lit = 0.0f; float amb_da = ambiance; - if (da >= 0) + if (da >= 0.0) { lit = max(da * dist_atten, 0.0); col = lit * light_col * diffuse; @@ -157,10 +157,10 @@ vec3 calcPointLightOrSpotLight(vec3 light_col, vec3 npos, vec3 diffuse, vec4 spe float nv = dot(n, npos); float vh = dot(npos, h); float sa = nh; - float fres = pow(1 - dot(h, npos), 5)*0.4 + 0.5; + float fres = pow(1.0 - dot(h, npos), 5.0)*0.4 + 0.5; - float gtdenom = 2 * nh; - float gt = max(0, min(gtdenom * nv / vh, gtdenom * da / vh)); + float gtdenom = 2.0 * nh; + float gt = max(0.0, min(gtdenom * nv / vh, gtdenom * da / vh)); if (nh > 0.0) { @@ -221,7 +221,7 @@ vec3 getNormal(inout float glossiness) #ifdef HAS_NORMAL_MAP vec4 vNt = texture(bumpMap, vary_texcoord1.xy); glossiness *= vNt.a; - vNt.xyz = vNt.xyz * 2 - 1; + vNt.xyz = vNt.xyz * 2.0 - 1.0; float sign = vary_sign; vec3 vN = vary_normal; vec3 vT = vary_tangent.xyz; @@ -360,9 +360,9 @@ void main() float lit = min(nl*6.0, 1.0); 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))); float scol = shadow*fres*texture(lightFunc, vec2(nh, glossiness)).r*gt/(nh*nl); color.rgb += lit*scol*sunlit_linear.rgb*spec.rgb; @@ -379,7 +379,7 @@ void main() applyLegacyEnv(color, legacyenv, spec, pos.xyz, norm.xyz, env); float cur_glare = max(max(legacyenv.r, legacyenv.g), legacyenv.b); - cur_glare = clamp(cur_glare, 0, 1); + cur_glare = clamp(cur_glare, 0.0, 1.0); cur_glare *= env; glare += cur_glare; } 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; } } } |