فهرست منبع

fixing various shader compile warnings and errors

Signed-off-by: Guthrie Adams <[email protected]>
Signed-off-by: ANT/guthadam <[email protected]>
Guthrie Adams 1 سال پیش
والد
کامیت
af2f26cc26

+ 2 - 2
AutomatedTesting/Materials/UVs.azsl

@@ -10,7 +10,7 @@
 #include <viewsrg.srgi>
 #include <Atom/Features/PBR/DefaultObjectSrg.azsli>
 #include <Atom/RPI/ShaderResourceGroups/DefaultDrawSrg.azsli>
-#include <Atom/Features/PBR/ForwardPassSrg.azsli>
+#include <Atom/Features/Pipeline/Forward/ForwardPassSrg.azsli>
 
 struct VertexInput
 {
@@ -47,4 +47,4 @@ PixelOutput MainPS(VertexOutput input)
     output.m_color = float4(input.m_uv, 0, 1);
 
     return output;
-}
+}

+ 2 - 2
Gems/Atom/Feature/Common/Assets/Shaders/Materials/MaterialFunctions/MultilayerParallaxDepth.azsli

@@ -54,7 +54,7 @@
 {
     // Dummy variables to call the above function
     float depthCS = 1.0;
-    bool isClipped;
-    
+    bool isClipped = false;
+
     MultilayerSetPixelDepth(vertexBlendMask, positionWS, normal, tangents, bitangents, uvs, isFrontFace, objectToWorld, depthNDC, depthCS, isClipped);
 }

+ 1 - 1
Gems/Atom/Feature/Common/Assets/Shaders/Materials/MaterialFunctions/ParallaxDepth.azsli

@@ -52,7 +52,7 @@
 {
     // Dummy variables to call the above function
     real depthCS = 1.0;
-    bool isClipped;
+    bool isClipped = false;
     
     SetPixelDepth(positionWS, normal, tangents, bitangents, uvs, isFrontFace, objectToWorld, depthNDC, depthCS, isClipped);
 }

+ 3 - 2
Gems/Atom/Feature/Common/Assets/Shaders/Materials/MaterialInputs/ParallaxInput.azsli

@@ -29,6 +29,8 @@ void GetParallaxInput(real3 normal, real3 tangent, real3 bitangent, real heightm
                       real4x4 objectWorldMatrix, real3x3 uvMatrix, real3x3 uvMatrixInverse,
                       inout float2 uv, inout float3 worldPosition, inout float depthNDC, inout float depthCS, out bool isClipped)
 {
+    isClipped = false;
+
     if(o_parallax_feature_enabled)
     {
         real3 dirToCamera;
@@ -72,7 +74,6 @@ void GetParallaxInput(real3 normal, real3 tangent, real3 bitangent, real heightm
 
             worldPosition = pdo.m_worldPosition;
         }
-        
     }
 }
 
@@ -80,7 +81,7 @@ void GetParallaxInput(real3 normal, real3 tangent, real3 bitangent, real heightm
                       real4x4 objectWorldMatrix, real3x3 uvMatrix, real3x3 uvMatrixInverse,
                       inout real2 uv, inout real3 worldPosition, inout float depthNDC, inout float depthCS)
 {
-    bool isClipped;
+    bool isClipped = false;
     GetParallaxInput(normal, tangent, bitangent, heightmapScale, heightmapOffset, objectWorldMatrix, uvMatrix, uvMatrixInverse, uv, worldPosition, depthNDC, depthCS, isClipped);
 }
 

+ 1 - 1
Gems/Atom/Feature/Common/Assets/Shaders/Reflections/ReflectionScreenSpaceDownsampleDepthLinear.azsl

@@ -145,4 +145,4 @@ PSOutput MainPS(VSOutput IN)
     PSOutput OUT;
     OUT.m_result = float2(minDepth, sigma);
     return OUT;
-}
+}