summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class1/deferred
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/deferred')
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/aoUtil.glsl4
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/deferredUtil.glsl6
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/globalF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/pbrterrainUtilF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/screenSpaceReflUtil.glsl6
5 files changed, 10 insertions, 10 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/aoUtil.glsl b/indra/newview/app_settings/shaders/class1/deferred/aoUtil.glsl
index 49470f0e39..1c394e1de4 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/aoUtil.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/aoUtil.glsl
@@ -79,10 +79,10 @@ float calcAmbientOcclusion(vec4 pos, vec3 norm, vec2 pos_screen)
{
float ret = 1.0;
vec3 pos_world = pos.xyz;
- vec2 noise_reflect = texture(noiseMap, pos_screen.xy * (screen_res / 128)).xy;
+ vec2 noise_reflect = texture(noiseMap, pos_screen.xy * (screen_res / 128.0)).xy;
float angle_hidden = 0.0;
- float points = 0;
+ float points = 0.0;
float scale = min(ssao_radius / -pos_world.z, ssao_max_radius);
diff --git a/indra/newview/app_settings/shaders/class1/deferred/deferredUtil.glsl b/indra/newview/app_settings/shaders/class1/deferred/deferredUtil.glsl
index 01543732d0..38fbda316b 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/deferredUtil.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/deferredUtil.glsl
@@ -241,7 +241,7 @@ vec4 texture2DLodSpecular(vec2 tc, float lod)
vec2 dist = vec2(0.5) - abs(tc-vec2(0.5));
float det = min(lod/(proj_lod*0.5), 1.0);
float d = min(dist.x, dist.y);
- d *= min(1, d * (proj_lod - lod)); // BUG? extra factor compared to diffuse causes N repeats
+ d *= min(1.0, d * (proj_lod - lod)); // BUG? extra factor compared to diffuse causes N repeats
float edge = 0.25*det;
ret *= clamp(d/edge, 0.0, 1.0);
@@ -357,7 +357,7 @@ vec3 pbrIbl(vec3 diffuseColor,
float perceptualRough)
{
// retrieve a scale and bias to F0. See [1], Figure 3
- vec2 brdf = BRDF(clamp(nv, 0, 1), 1.0-perceptualRough);
+ vec2 brdf = BRDF(clamp(nv, 0.0, 1.0), 1.0-perceptualRough);
vec3 diffuseLight = irradiance;
vec3 specularLight = radiance;
@@ -517,7 +517,7 @@ uniform float waterSign;
void waterClip(vec3 pos)
{
// TODO: make this less branchy
- if (waterSign > 0)
+ if (waterSign > 0.0)
{
if ((dot(pos.xyz, waterPlane.xyz) + waterPlane.w) < 0.0)
{
diff --git a/indra/newview/app_settings/shaders/class1/deferred/globalF.glsl b/indra/newview/app_settings/shaders/class1/deferred/globalF.glsl
index 7e3e7d9271..e407dad21c 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/globalF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/globalF.glsl
@@ -34,7 +34,7 @@ uniform float clipSign;
void mirrorClip(vec3 pos)
{
- if (mirror_flag > 0)
+ if (mirror_flag > 0.0)
{
if ((dot(pos.xyz, clipPlane.xyz) + clipPlane.w) < 0.0)
{
diff --git a/indra/newview/app_settings/shaders/class1/deferred/pbrterrainUtilF.glsl b/indra/newview/app_settings/shaders/class1/deferred/pbrterrainUtilF.glsl
index 935c3f9301..04eb135c90 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/pbrterrainUtilF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/pbrterrainUtilF.glsl
@@ -256,7 +256,7 @@ vec3 _t_normal_post_1(vec3 vNt0, float sign_or_zero)
sign = (2.0*sign) + 1.0;
sign /= abs(sign);
// If the sign is negative, rotate normal by 180 degrees
- vNt1.xy = (min(0, sign) * vNt1.xy) + (min(0, -sign) * -vNt1.xy);
+ vNt1.xy = (min(0.0, sign) * vNt1.xy) + (min(0.0, -sign) * -vNt1.xy);
return vNt1;
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/screenSpaceReflUtil.glsl b/indra/newview/app_settings/shaders/class1/deferred/screenSpaceReflUtil.glsl
index cf0595ee45..a33c4cc58b 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/screenSpaceReflUtil.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/screenSpaceReflUtil.glsl
@@ -25,13 +25,13 @@
// debug stub
-float random (vec2 uv)
+float random (vec2 uv)
{
- return 0;
+ return 0.;
}
float tapScreenSpaceReflection(int totalSamples, vec2 tc, vec3 viewPos, vec3 n, inout vec4 collectedColor, sampler2D source, float glossiness)
{
collectedColor = vec4(0);
- return 0;
+ return 0.;
}