From ac7e8623bf42a7fb123a916f5b15201158775a16 Mon Sep 17 00:00:00 2001 From: SamGondelman Date: Fri, 20 Apr 2018 18:25:30 -0700 Subject: [PATCH] quiet shader warnings --- libraries/render-utils/src/directional_ambient_light.slf | 4 ++-- .../render-utils/src/directional_ambient_light_shadow.slf | 4 ++-- libraries/render-utils/src/directional_skybox_light.slf | 4 ++-- .../render-utils/src/directional_skybox_light_shadow.slf | 4 ++-- libraries/render-utils/src/local_lights_drawOutline.slf | 1 + libraries/render-utils/src/local_lights_shading.slf | 4 ++-- 6 files changed, 11 insertions(+), 10 deletions(-) diff --git a/libraries/render-utils/src/directional_ambient_light.slf b/libraries/render-utils/src/directional_ambient_light.slf index 6c99d44c5f..d7e0dcd08c 100644 --- a/libraries/render-utils/src/directional_ambient_light.slf +++ b/libraries/render-utils/src/directional_ambient_light.slf @@ -36,8 +36,8 @@ void main(void) { } else if (frag.mode == FRAG_MODE_LIGHTMAPPED) { discard; } else { - vec4 midNormalCurvature; - vec4 lowNormalCurvature; + vec4 midNormalCurvature = vec4(0); + vec4 lowNormalCurvature = vec4(0); if (frag.mode == FRAG_MODE_SCATTERING) { unpackMidLowNormalCurvature(_texCoord0, midNormalCurvature, lowNormalCurvature); } diff --git a/libraries/render-utils/src/directional_ambient_light_shadow.slf b/libraries/render-utils/src/directional_ambient_light_shadow.slf index eead392fd8..fda0164b4d 100644 --- a/libraries/render-utils/src/directional_ambient_light_shadow.slf +++ b/libraries/render-utils/src/directional_ambient_light_shadow.slf @@ -37,8 +37,8 @@ void main(void) { } else if (frag.mode == FRAG_MODE_LIGHTMAPPED) { discard; } else { - vec4 midNormalCurvature; - vec4 lowNormalCurvature; + vec4 midNormalCurvature = vec4(0); + vec4 lowNormalCurvature = vec4(0); if (frag.mode == FRAG_MODE_SCATTERING) { unpackMidLowNormalCurvature(_texCoord0, midNormalCurvature, lowNormalCurvature); } diff --git a/libraries/render-utils/src/directional_skybox_light.slf b/libraries/render-utils/src/directional_skybox_light.slf index d609dd2300..65b4b086e9 100644 --- a/libraries/render-utils/src/directional_skybox_light.slf +++ b/libraries/render-utils/src/directional_skybox_light.slf @@ -33,8 +33,8 @@ void main(void) { } else if (frag.mode == FRAG_MODE_LIGHTMAPPED) { discard; } else { - vec4 midNormalCurvature; - vec4 lowNormalCurvature; + vec4 midNormalCurvature = vec4(0); + vec4 lowNormalCurvature = vec4(0); if (frag.mode == FRAG_MODE_SCATTERING) { unpackMidLowNormalCurvature(_texCoord0, midNormalCurvature, lowNormalCurvature); } diff --git a/libraries/render-utils/src/directional_skybox_light_shadow.slf b/libraries/render-utils/src/directional_skybox_light_shadow.slf index 2a2f8f65a3..e927f53a1f 100644 --- a/libraries/render-utils/src/directional_skybox_light_shadow.slf +++ b/libraries/render-utils/src/directional_skybox_light_shadow.slf @@ -38,8 +38,8 @@ void main(void) { } else if (frag.mode == FRAG_MODE_LIGHTMAPPED) { discard; } else { - vec4 midNormalCurvature; - vec4 lowNormalCurvature; + vec4 midNormalCurvature = vec4(0); + vec4 lowNormalCurvature = vec4(0); if (frag.mode == FRAG_MODE_SCATTERING) { unpackMidLowNormalCurvature(_texCoord0, midNormalCurvature, lowNormalCurvature); } diff --git a/libraries/render-utils/src/local_lights_drawOutline.slf b/libraries/render-utils/src/local_lights_drawOutline.slf index 38dd383459..f4a135ff0d 100644 --- a/libraries/render-utils/src/local_lights_drawOutline.slf +++ b/libraries/render-utils/src/local_lights_drawOutline.slf @@ -62,6 +62,7 @@ void main(void) { // Frag to eye vec vec4 fragEyeVector = invViewMat * vec4(-frag.position.xyz, 0.0); vec3 fragEyeDir = normalize(fragEyeVector.xyz); + _fragColor = vec4(0, 0, 0, 1); int numLightTouching = 0; int lightClusterOffset = cluster.z; diff --git a/libraries/render-utils/src/local_lights_shading.slf b/libraries/render-utils/src/local_lights_shading.slf index 8ae8f3fb5b..b224fcb77d 100644 --- a/libraries/render-utils/src/local_lights_shading.slf +++ b/libraries/render-utils/src/local_lights_shading.slf @@ -45,8 +45,8 @@ void main(void) { discard; } - vec4 midNormalCurvature; - vec4 lowNormalCurvature; + vec4 midNormalCurvature = vec4(0); + vec4 lowNormalCurvature = vec4(0); if (frag.mode == FRAG_MODE_SCATTERING) { unpackMidLowNormalCurvature(texCoord, midNormalCurvature, lowNormalCurvature); }