summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/app_settings/shaders')
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/materialF.glsl18
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/multiPointLightF.glsl6
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/pointLightF.glsl6
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/spotLightF.glsl10
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 140bd731ff..f04dca2b36 100644
--- a/indra/newview/app_settings/shaders/class3/deferred/materialF.glsl
+++ b/indra/newview/app_settings/shaders/class3/deferred/materialF.glsl
@@ -137,7 +137,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;
@@ -158,10 +158,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)
{
@@ -222,7 +222,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;
@@ -361,9 +361,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;
@@ -380,7 +380,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 8db3bcd363..d4359e7aa3 100644
--- a/indra/newview/app_settings/shaders/class3/deferred/multiPointLightF.glsl
+++ b/indra/newview/app_settings/shaders/class3/deferred/multiPointLightF.glsl
@@ -152,10 +152,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 987089fcc9..1ca4024c69 100644
--- a/indra/newview/app_settings/shaders/class3/deferred/pointLightF.glsl
+++ b/indra/newview/app_settings/shaders/class3/deferred/pointLightF.glsl
@@ -133,9 +133,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 78db8ccf5b..d13e71445f 100644
--- a/indra/newview/app_settings/shaders/class3/deferred/spotLightF.glsl
+++ b/indra/newview/app_settings/shaders/class3/deferred/spotLightF.glsl
@@ -198,7 +198,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)
@@ -221,10 +221,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)
{
@@ -258,7 +258,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;
}
}
}