Selaa lähdekoodia

Pass changes WIP: touching up ray tracing AO pass

antonmic 4 vuotta sitten
vanhempi
commit
e1963aaca3

+ 2 - 2
Gem/Code/Source/Passes/RayTracingAmbientOcclusionPass.cpp

@@ -117,13 +117,13 @@ namespace AZ
 
 
         void RayTracingAmbientOcclusionPass::FrameBeginInternal(FramePrepareParams params)
         void RayTracingAmbientOcclusionPass::FrameBeginInternal(FramePrepareParams params)
         {
         {
-            if (!m_flags.m_initialized)
+            if (m_createRayTracingPipelineState)
             {
             {
                 RPI::Scene* scene = m_pipeline->GetScene();
                 RPI::Scene* scene = m_pipeline->GetScene();
                 m_rayTracingFeatureProcessor = scene->GetFeatureProcessor<RayTracingFeatureProcessor>();
                 m_rayTracingFeatureProcessor = scene->GetFeatureProcessor<RayTracingFeatureProcessor>();
 
 
                 CreateRayTracingPipelineState();
                 CreateRayTracingPipelineState();
-                m_flags.m_initialized = true;
+                m_createRayTracingPipelineState = false;
             }
             }
 
 
             if (!m_rayTracingShaderTable)
             if (!m_rayTracingShaderTable)

+ 2 - 0
Gem/Code/Source/Passes/RayTracingAmbientOcclusionPass.h

@@ -83,6 +83,8 @@ namespace AZ
             float m_rayMaxT = 0.4f;          // The ray's far distance
             float m_rayMaxT = 0.4f;          // The ray's far distance
             float m_rayMinT = 0.01f;        // The ray's near distance
             float m_rayMinT = 0.01f;        // The ray's near distance
             uint32_t m_rayNumber = 8;      // Ray casted per pixel
             uint32_t m_rayNumber = 8;      // Ray casted per pixel
+
+            bool m_createRayTracingPipelineState = true;
         };
         };
     }   // namespace RPI
     }   // namespace RPI
 }   // namespace AZ
 }   // namespace AZ