Browse Source

Merge pull request #52 from aws-lumberyard-dev/AtomSampleViewer/antonmic/lowEnd

AtomSampleViewer changes for Low End Render Pipeline
Anton Michels 4 years ago
parent
commit
8fc7108373

+ 70 - 0
Gem/Code/Source/MeshExampleComponent.cpp

@@ -81,6 +81,37 @@ namespace AtomSampleViewer
         };
     }
 
+    void MeshExampleComponent::DefaultWindowCreated()
+    {
+        AZ::Render::Bootstrap::DefaultWindowBus::BroadcastResult(m_windowContext, &AZ::Render::Bootstrap::DefaultWindowBus::Events::GetDefaultWindowContext);
+    }
+
+    void MeshExampleComponent::CreateLowEndPipeline()
+    {
+        // Create low end pipeline
+        AZ::RPI::RenderPipelineDescriptor pipelineDesc;
+        pipelineDesc.m_mainViewTagName = "MainCamera";
+        pipelineDesc.m_name = "LowEndPipeline";
+        pipelineDesc.m_rootPassTemplate = "LowEndPipelineTemplate";
+        pipelineDesc.m_renderSettings.m_multisampleState.m_samples = 4;
+
+        m_lowEndPipeline = AZ::RPI::RenderPipeline::CreateRenderPipelineForWindow(pipelineDesc, *m_windowContext);
+
+        // Add it to the scene
+        AZ::RPI::ScenePtr defaultScene = AZ::RPI::RPISystemInterface::Get()->GetDefaultScene();
+        m_originalPipeline = defaultScene->GetDefaultRenderPipeline();
+        defaultScene->AddRenderPipeline(m_lowEndPipeline);
+        m_lowEndPipeline->SetDefaultView(m_originalPipeline->GetDefaultView());
+        m_lowEndPipeline->RemoveFromRenderTick();
+    }
+
+    void MeshExampleComponent::DestroyLowEndPipeline()
+    {
+        AZ::RPI::ScenePtr defaultScene = AZ::RPI::RPISystemInterface::Get()->GetDefaultScene();
+        defaultScene->RemoveRenderPipeline(m_lowEndPipeline->GetId());
+        m_lowEndPipeline = nullptr;
+    }
+
     void MeshExampleComponent::Activate()
     {
         UseArcBallCameraController();
@@ -118,10 +149,18 @@ namespace AtomSampleViewer
         m_groundPlaneModelAsset = AZ::RPI::AssetUtils::GetAssetByProductPath<AZ::RPI::ModelAsset>("objects/plane.azmodel", AZ::RPI::AssetUtils::TraceLevel::Assert);
 
         AZ::TickBus::Handler::BusConnect();
+        AZ::Render::Bootstrap::DefaultWindowNotificationBus::Handler::BusConnect();
+        CreateLowEndPipeline();
     }
 
     void MeshExampleComponent::Deactivate()
     {
+        if (m_useLowEndPipeline)
+        {
+            DeactivateLowEndPipeline();
+        }
+        DestroyLowEndPipeline();
+        AZ::Render::Bootstrap::DefaultWindowNotificationBus::Handler::BusDisconnect();
         AZ::TickBus::Handler::BusDisconnect();
 
         m_imguiSidebar.Deactivate();
@@ -142,16 +181,47 @@ namespace AtomSampleViewer
         ShutdownLightingPresets();
     }
 
+    void MeshExampleComponent::ActivateLowEndPipeline()
+    {
+        m_lowEndPipeline->AddToRenderTick();
+        m_originalPipeline->RemoveFromRenderTick();
+        m_imguiScope = AZ::Render::ImGuiActiveContextScope::FromPass(AZ::RPI::PassHierarchyFilter({ m_lowEndPipeline->GetId().GetCStr(), "ImGuiPass" }));
+    }
+
+    void MeshExampleComponent::DeactivateLowEndPipeline()
+    {
+        m_originalPipeline->AddToRenderTick();
+        m_lowEndPipeline->RemoveFromRenderTick();
+        m_imguiScope = {}; // restores previous ImGui context.
+    }
+
     void MeshExampleComponent::OnTick([[maybe_unused]] float deltaTime, [[maybe_unused]] AZ::ScriptTimePoint time)
     {
         bool modelNeedsUpdate = false;
 
+        // Switch pipeline before any imGui actions (switching pipelines switches imGui scope)
+        if (m_switchPipeline)
+        {
+            if (m_useLowEndPipeline)
+            {
+                ActivateLowEndPipeline();
+            }
+            else
+            {
+                DeactivateLowEndPipeline();
+            }
+
+            m_switchPipeline = false;
+        }
+
         if (m_imguiSidebar.Begin())
         {
             ImGuiLightingPreset();
 
             ImGuiAssetBrowser::WidgetSettings assetBrowserSettings;
 
+            m_switchPipeline = ScriptableImGui::Checkbox("Use Low End Pipeline", &m_useLowEndPipeline) || m_switchPipeline;
+
             modelNeedsUpdate |= ScriptableImGui::Checkbox("Enable Material Override", &m_enableMaterialOverride);
            
             if (ScriptableImGui::Checkbox("Show Ground Plane", &m_showGroundPlane))

+ 20 - 0
Gem/Code/Source/MeshExampleComponent.h

@@ -23,12 +23,15 @@
 #include <Utils/ImGuiMaterialDetails.h>
 #include <Utils/ImGuiAssetBrowser.h>
 
+#include <Atom/Bootstrap/DefaultWindowBus.h>
+#include <Atom/Feature/ImGui/ImGuiUtils.h>
 #include <Atom/Feature/SkyBox/SkyBoxFeatureProcessorInterface.h>
 
 namespace AtomSampleViewer
 {
     class MeshExampleComponent final
         : public CommonSampleComponentBase
+        , public AZ::Render::Bootstrap::DefaultWindowNotificationBus::Handler
         , public AZ::TickBus::Handler
     {
     public:
@@ -63,6 +66,20 @@ namespace AtomSampleViewer
         void SetArcBallControllerParams();
         void ResetCameraController();
 
+        void DefaultWindowCreated() override;
+
+        void CreateLowEndPipeline();
+        void DestroyLowEndPipeline();
+
+        void ActivateLowEndPipeline();
+        void DeactivateLowEndPipeline();
+
+        AZ::RPI::RenderPipelinePtr m_lowEndPipeline;
+        AZ::RPI::RenderPipelinePtr m_originalPipeline;
+
+        AZStd::shared_ptr<AZ::RPI::WindowContext> m_windowContext;
+        AZ::Render::ImGuiActiveContextScope m_imguiScope;
+
         enum class CameraControllerType : int32_t 
         {
             ArcBall = 0,
@@ -95,6 +112,9 @@ namespace AtomSampleViewer
 
         bool m_cameraControllerDisabled = false;
 
+        bool m_useLowEndPipeline = false;
+        bool m_switchPipeline = false;
+
         AZ::Data::Instance<AZ::RPI::Material> m_materialOverrideInstance; //< Holds a copy of the material instance being used when m_enableMaterialOverride is true.
         AZ::Render::MeshFeatureProcessorInterface::MeshHandle m_meshHandle;
         AZ::Data::Asset<AZ::RPI::ModelAsset> m_modelAsset;

+ 0 - 1
Gem/Code/Source/SsaoExampleComponent.cpp

@@ -178,7 +178,6 @@ namespace AtomSampleViewer
 
         AZ::RPI::ScenePtr defaultScene = AZ::RPI::RPISystemInterface::Get()->GetDefaultScene();
         defaultScene->AddRenderPipeline(m_originalPipeline);
-        AZ::RPI::RenderPipelineDescriptor pipelineDesc;
         defaultScene->RemoveRenderPipeline(m_ssaoPipeline->GetId());
         DestroySsaoPipeline();
     }

+ 1 - 1
Passes/CheckerboardPipeline.pass

@@ -363,7 +363,7 @@
                 },
                 {
                     "Name": "SkyBoxPass",
-                    "TemplateName": "SkyBoxTemplate",
+                    "TemplateName": "SkyBoxTwoOutputsTemplate",
                     "Enabled": true,
                     "Connections": [
                         {

+ 0 - 442
Passes/MainPipeline.pass

@@ -1,442 +0,0 @@
-{
-    "Type": "JsonSerialization",
-    "Version": 1,
-    "ClassName": "PassAsset",
-    "ClassData": {
-        "PassTemplate": {
-            "Name": "MainPipeline",
-            "PassClass": "ParentPass",
-            "Slots": [
-                {
-                    "Name": "SwapChainOutput",
-                    "SlotType": "InputOutput",
-                    "ScopeAttachmentUsage": "RenderTarget"
-                }
-            ],
-            "PassRequests": [
-                {
-                    "Name": "MorphTargetPass",
-                    "TemplateName": "MorphTargetPassTemplate"
-                },
-                {
-                    "Name": "SkinningPass",
-                    "TemplateName": "SkinningPassTemplate",
-                    "Connections": [
-                        {
-                            "LocalSlot": "SkinnedMeshOutputStream",
-                            "AttachmentRef": {
-                                "Pass": "MorphTargetPass",
-                                "Attachment": "MorphTargetDeltaOutput"
-                            }
-                        }
-                    ]
-                },
-                {
-                    "Name": "RayTracingAccelerationStructurePass",
-                    "TemplateName": "RayTracingAccelerationStructurePassTemplate"
-                },
-                {
-                    "Name": "DiffuseProbeGridUpdatePass",
-                    "TemplateName": "DiffuseProbeGridUpdatePassTemplate",
-                    "ExecuteAfter": [
-                        "RayTracingAccelerationStructurePass"
-                    ]
-                },
-                {
-                    "Name": "DepthPrePass",
-                    "TemplateName": "DepthMSAAParentTemplate",
-                    "Connections": [
-                        {
-                            "LocalSlot": "SkinnedMeshes",
-                            "AttachmentRef": {
-                                "Pass": "SkinningPass",
-                                "Attachment": "SkinnedMeshOutputStream"
-                            }
-                        },
-                        {
-                            "LocalSlot": "SwapChainOutput",
-                            "AttachmentRef": {
-                                "Pass": "Parent",
-                                "Attachment": "SwapChainOutput"
-                            }
-                        }
-                    ]
-                },
-                {
-                    "Name": "MotionVectorPass",
-                    "TemplateName": "MotionVectorParentTemplate",
-                    "Connections": [
-                        {
-                            "LocalSlot": "SkinnedMeshes",
-                            "AttachmentRef": {
-                                "Pass": "SkinningPass",
-                                "Attachment": "SkinnedMeshOutputStream"
-                            }
-                        },
-                        {
-                            "LocalSlot": "Depth",
-                            "AttachmentRef": {
-                                "Pass": "DepthPrePass",
-                                "Attachment": "Depth"
-                            }
-                        },
-                        {
-                            "LocalSlot": "SwapChainOutput",
-                            "AttachmentRef": {
-                                "Pass": "Parent",
-                                "Attachment": "SwapChainOutput"
-                            }
-                        }
-                    ]
-                },
-                {
-                    "Name": "LightCullingPass",
-                    "TemplateName": "LightCullingParentTemplate",
-                    "Connections": [
-                        {
-                            "LocalSlot": "SkinnedMeshes",
-                            "AttachmentRef": {
-                                "Pass": "SkinningPass",
-                                "Attachment": "SkinnedMeshOutputStream"
-                            }
-                        },
-                        {
-                            "LocalSlot": "DepthMSAA",
-                            "AttachmentRef": {
-                                "Pass": "DepthPrePass",
-                                "Attachment": "DepthMSAA"
-                            }
-                        },
-                        {
-                            "LocalSlot": "SwapChainOutput",
-                            "AttachmentRef": {
-                                "Pass": "Parent",
-                                "Attachment": "SwapChainOutput"
-                            }
-                        }
-                    ]
-                },
-                {
-                    "Name": "ShadowPass",
-                    "TemplateName": "ShadowParentTemplate",
-                    "Connections": [
-                        {
-                            "LocalSlot": "SkinnedMeshes",
-                            "AttachmentRef": {
-                                "Pass": "SkinningPass",
-                                "Attachment": "SkinnedMeshOutputStream"
-                            }
-                        },
-                        {
-                            "LocalSlot": "SwapChainOutput",
-                            "AttachmentRef": {
-                                "Pass": "Parent",
-                                "Attachment": "SwapChainOutput"
-                            }
-                        }
-                    ]
-                },
-                {
-                    "Name": "OpaquePass",
-                    "TemplateName": "OpaqueParentTemplate",
-                    "Connections": [
-                        {
-                            "LocalSlot": "DirectionalShadowmap",
-                            "AttachmentRef": {
-                                "Pass": "ShadowPass",
-                                "Attachment": "DirectionalShadowmap"
-                            }
-                        },
-                        {
-                            "LocalSlot": "DirectionalESM",
-                            "AttachmentRef": {
-                                "Pass": "ShadowPass",
-                                "Attachment": "DirectionalESM"
-                            }
-                        },
-                        {
-                            "LocalSlot": "ProjectedShadowmap",
-                            "AttachmentRef": {
-                                "Pass": "ShadowPass",
-                                "Attachment": "ProjectedShadowmap"
-                            }
-                        },
-                        {
-                            "LocalSlot": "ProjectedESM",
-                            "AttachmentRef": {
-                                "Pass": "ShadowPass",
-                                "Attachment": "ProjectedESM"
-                            }
-                        },
-                        {
-                            "LocalSlot": "TileLightData",
-                            "AttachmentRef": {
-                                "Pass": "LightCullingPass",
-                                "Attachment": "TileLightData"
-                            }
-                        },
-                        {
-                            "LocalSlot": "LightListRemapped",
-                            "AttachmentRef": {
-                                "Pass": "LightCullingPass",
-                                "Attachment": "LightListRemapped"
-                            }
-                        },
-                        {
-                            "LocalSlot": "DepthLinear",
-                            "AttachmentRef": {
-                                "Pass": "DepthPrePass",
-                                "Attachment": "DepthLinear"
-                            }
-                        },
-                        {
-                            "LocalSlot": "DepthStencil",
-                            "AttachmentRef": {
-                                "Pass": "DepthPrePass",
-                                "Attachment": "DepthMSAA"
-                            }
-                        },
-                        {
-                            "LocalSlot": "SwapChainOutput",
-                            "AttachmentRef": {
-                                "Pass": "Parent",
-                                "Attachment": "SwapChainOutput"
-                            }
-                        }
-                    ]
-                },
-                {
-                    "Name": "TransparentPass",
-                    "TemplateName": "TransparentParentTemplate",
-                    "Connections": [
-                        {
-                            "LocalSlot": "DirectionalShadowmap",
-                            "AttachmentRef": {
-                                "Pass": "ShadowPass",
-                                "Attachment": "DirectionalShadowmap"
-                            }
-                        },
-                        {
-                            "LocalSlot": "DirectionalESM",
-                            "AttachmentRef": {
-                                "Pass": "ShadowPass",
-                                "Attachment": "DirectionalESM"
-                            }
-                        },
-                        {
-                            "LocalSlot": "ProjectedShadowmap",
-                            "AttachmentRef": {
-                                "Pass": "ShadowPass",
-                                "Attachment": "ProjectedShadowmap"
-                            }
-                        },
-                        {
-                            "LocalSlot": "ProjectedESM",
-                            "AttachmentRef": {
-                                "Pass": "ShadowPass",
-                                "Attachment": "ProjectedESM"
-                            }
-                        },
-                        {
-                            "LocalSlot": "TileLightData",
-                            "AttachmentRef": {
-                                "Pass": "LightCullingPass",
-                                "Attachment": "TileLightData"
-                            }
-                        },
-                        {
-                            "LocalSlot": "LightListRemapped",
-                            "AttachmentRef": {
-                                "Pass": "LightCullingPass",
-                                "Attachment": "LightListRemapped"
-                            }
-                        },
-                        {
-                            "LocalSlot": "DepthStencil",
-                            "AttachmentRef": {
-                                "Pass": "DepthPrePass",
-                                "Attachment": "Depth"
-                            }
-                        },
-                        {
-                            "LocalSlot": "InputOutput",
-                            "AttachmentRef": {
-                                "Pass": "OpaquePass",
-                                "Attachment": "Output"
-                            }
-                        }
-                    ]
-                },
-                {
-                    "Name": "DeferredFogPass",
-                    "TemplateName": "DeferredFogPassTemplate",
-                    "Enabled": false,
-                    "Connections": [
-                        {
-                            "LocalSlot": "InputLinearDepth",
-                            "AttachmentRef": {
-                                "Pass": "DepthPrePass",
-                                "Attachment": "DepthLinear"
-                            }
-                        },
-                        {
-                            "LocalSlot": "InputDepthStencil",
-                            "AttachmentRef": {
-                                "Pass": "DepthPrePass",
-                                "Attachment": "Depth"
-                            }
-                        },
-                        {
-                            "LocalSlot": "RenderTargetInputOutput",
-                            "AttachmentRef": {
-                                "Pass": "TransparentPass",
-                                "Attachment": "InputOutput"
-                            }
-                        }
-                    ],
-                    "PassData": {
-                        "$type": "FullscreenTrianglePassData",
-                        "ShaderAsset": {
-                            "FilePath": "Shaders/ScreenSpace/DeferredFog.shader"
-                        },
-                        "PipelineViewTag": "MainCamera"
-                    }
-                },
-                {
-                    "Name": "ReflectionCopyFrameBufferPass",
-                    "TemplateName": "ReflectionCopyFrameBufferPassTemplate",
-                    "Enabled": false,
-                    "Connections": [
-                        {
-                            "LocalSlot": "Input",
-                            "AttachmentRef": {
-                                "Pass": "DeferredFogPass",
-                                "Attachment": "RenderTargetInputOutput"
-                            }
-                        }
-                    ]
-                },
-                {
-                    "Name": "PostProcessPass",
-                    "TemplateName": "PostProcessParentTemplate",
-                    "Connections": [
-                        {
-                            "LocalSlot": "LightingInput",
-                            "AttachmentRef": {
-                                "Pass": "DeferredFogPass",
-                                "Attachment": "RenderTargetInputOutput"
-                            }
-                        },
-                        {
-                            "LocalSlot": "Depth",
-                            "AttachmentRef": {
-                                "Pass": "DepthPrePass",
-                                "Attachment": "Depth"
-                            }
-                        },
-                        {
-                            "LocalSlot": "SwapChainOutput",
-                            "AttachmentRef": {
-                                "Pass": "Parent",
-                                "Attachment": "SwapChainOutput"
-                            }
-                        }
-                    ]
-                },
-                {
-                    "Name": "AuxGeomPass",
-                    "TemplateName": "AuxGeomPassTemplate",
-                    "Enabled": true,
-                    "Connections": [
-                        {
-                            "LocalSlot": "ColorInputOutput",
-                            "AttachmentRef": {
-                                "Pass": "PostProcessPass",
-                                "Attachment": "Output"
-                            }
-                        },
-                        {
-                            "LocalSlot": "DepthInputOutput",
-                            "AttachmentRef": {
-                                "Pass": "DepthPrePass",
-                                "Attachment": "Depth"
-                            }
-                        }
-                    ],
-                    "PassData": {
-                        "$type": "RasterPassData",
-                        "DrawListTag": "auxgeom",
-                        "PipelineViewTag": "MainCamera"
-                    }
-                },
-                {
-                    "Name": "DebugOverlayPass",
-                    "TemplateName": "DebugOverlayParentTemplate",
-                    "Connections": [
-                        {
-                            "LocalSlot": "TileLightData",
-                            "AttachmentRef": {
-                                "Pass": "LightCullingPass",
-                                "Attachment": "TileLightData"
-                            }
-                        },
-                        {
-                            "LocalSlot": "RawLightingInput",
-                            "AttachmentRef": {
-                                "Pass": "PostProcessPass",
-                                "Attachment": "RawLightingOutput"
-                            }
-                        },
-                        {
-                            "LocalSlot": "LuminanceMipChainInput",
-                            "AttachmentRef": {
-                                "Pass": "PostProcessPass",
-                                "Attachment": "LuminanceMipChainOutput"
-                            }
-                        },
-                        {
-                            "LocalSlot": "InputOutput",
-                            "AttachmentRef": {
-                                "Pass": "AuxGeomPass",
-                                "Attachment": "ColorInputOutput"
-                            }
-                        }
-                    ]
-                },
-                {
-                    "Name": "UIPass",
-                    "TemplateName": "UIParentTemplate",
-                    "Connections": [
-                        {
-                            "LocalSlot": "InputOutput",
-                            "AttachmentRef": {
-                                "Pass": "DebugOverlayPass",
-                                "Attachment": "InputOutput"
-                            }
-                        }
-                    ]
-                },
-                {
-                    "Name": "CopyToSwapChain",
-                    "TemplateName": "FullscreenCopyTemplate",
-                    "Connections": [
-                        {
-                            "LocalSlot": "Input",
-                            "AttachmentRef": {
-                                "Pass": "UIPass",
-                                "Attachment": "InputOutput"
-                            }
-                        },
-                        {
-                            "LocalSlot": "Output",
-                            "AttachmentRef": {
-                                "Pass": "Parent",
-                                "Attachment": "SwapChainOutput"
-                            }
-                        }
-                    ]
-                }
-            ]
-        }
-    }
-}

+ 0 - 15
Passes/MainRenderPipeline.azasset

@@ -1,15 +0,0 @@
-{
-    "Type": "JsonSerialization",
-    "Version": 1,
-    "ClassName": "RenderPipelineDescriptor",
-    "ClassData": {
-        "Name": "MainPipeline",
-        "MainViewTag": "MainCamera",
-        "RootPassTemplate": "MainPipeline",
-        "RenderSettings": {
-            "MultisampleState": {
-                "samples": 4
-            }
-        }
-    }
-}

+ 18 - 1
atomsampleviewer_asset_files.cmake

@@ -22,7 +22,6 @@ set(FILES
     Passes/ImGuiNoInput.pass
     Passes/ImGuiOnlyPipeline.pass
     Passes/LuxCoreTexture.pass
-    Passes/MainPipeline.pass
     Passes/MainPipeline_Mobile.pass
     Passes/Monochrome.pass
     Passes/MSAA_2x_RPI_Pipeline.pass
@@ -30,9 +29,11 @@ set(FILES
     Passes/MSAA_8x_RPI_Pipeline.pass
     Passes/MSAA_RPI_Pipeline_Core.pass
     Passes/No_MSAA_RPI_Pipeline.pass
+    Passes/RayTracingAmbientOcclusion.pass
     Passes/RenderTexture.pass
     Passes/RHISamplePass.pass
     Passes/RHISamplePipeline.pass
+    Passes/SelectorPass.pass
     Passes/SsaoPipeline.pass
     Scripts/AreaLightTest.bv.lua
     Scripts/CheckerboardTest.bv.lua
@@ -54,6 +55,8 @@ set(FILES
     Scripts/ShadowTest.bv.lua
     Scripts/StreamingImageTest.bv.lua
     Scripts/TransparentTest.bv.lua
+    Scripts/_AutomatedPeriodicTestSuite_.bv.lua
+    Scripts/_AutomatedReviewTestSuite_.bv.lua
     Scripts/_FullTestSuite_.bv.lua
     Shaders/DebugVertexNormals.azsl
     Shaders/DebugVertexNormals.materialtype
@@ -78,6 +81,13 @@ set(FILES
     Shaders/PostProcessing/Monochrome.shader
     Shaders/PostProcessing/MSAAResolveDepth.azsl
     Shaders/PostProcessing/MSAAResolveDepth.shader
+    Shaders/RayTracing/RTAOClosestHit.azsl
+    Shaders/RayTracing/RTAOClosestHit.shader
+    Shaders/RayTracing/RTAODefines.azsli
+    Shaders/RayTracing/RTAOGeneration.azsl
+    Shaders/RayTracing/RTAOGeneration.shader
+    Shaders/RayTracing/RTAOMiss.azsl
+    Shaders/RayTracing/RTAOMiss.shader
     Shaders/RHI/AsyncComputeLuminanceMap.azsl
     Shaders/RHI/AsyncComputeLuminanceMap.shader
     Shaders/RHI/AsyncComputeLuminanceReduce.azsl
@@ -120,10 +130,17 @@ set(FILES
     Shaders/RHI/MultipleViewsShadow.shader
     Shaders/RHI/Multithread.azsl
     Shaders/RHI/Multithread.shader
+    Shaders/RHI/RayTracingClosestHitGradient.azsl
+    Shaders/RHI/RayTracingClosestHitGradient.shader
+    Shaders/RHI/RayTracingClosestHitSolid.azsl
+    Shaders/RHI/RayTracingClosestHitSolid.shader
+    Shaders/RHI/RayTracingCommon.azsli
     Shaders/RHI/RayTracingDispatch.azsl
     Shaders/RHI/RayTracingDispatch.shader
     Shaders/RHI/RayTracingDraw.azsl
     Shaders/RHI/RayTracingDraw.shader
+    Shaders/RHI/RayTracingMiss.azsl
+    Shaders/RHI/RayTracingMiss.shader
     Shaders/RHI/SHDemo.azsl
     Shaders/RHI/SHDemo.shader
     Shaders/RHI/SHRender.azsl

+ 16 - 11
generate_asset_cmake.bat

@@ -41,18 +41,23 @@ echo set(FILES>> %OUTPUT_FILE%
         set relativeFilePath=!relativeFilePath:\=/!
         
         
-        :: Filter out files in Materials/HotReloadTest. truncatedPath is the first 23 characters of the relative file path 
-        set truncatedPath=!relativeFilePath:~0,23!
-        if not !truncatedPath! == Materials/HotReloadTest (
-
-            :: Filter only relevant file types
-            if !relativeFilePath:~-4!  == .lua          echo %TAB%!relativeFilePath!
-            if !relativeFilePath:~-5!  == .pass         echo %TAB%!relativeFilePath!
-            if !relativeFilePath:~-5!  == .azsl         echo %TAB%!relativeFilePath!
-            if !relativeFilePath:~-6!  == .azsli        echo %TAB%!relativeFilePath!
-            if !relativeFilePath:~-7!  == .shader       echo %TAB%!relativeFilePath!
-            if !relativeFilePath:~-13! == .materialtype echo %TAB%!relativeFilePath!
+        :: Filter out files in Materials/HotReloadTest. materialHotReloadPath is the first 23 characters of the relative file path 
+        set materialHotReloadPath=!relativeFilePath:~0,23!
+        if not !materialHotReloadPath! == Materials/HotReloadTest (
+
+            :: Filter out files in Cache/. cachePath is the first 6 characters of the relative file path 
+            set cachePath=!relativeFilePath:~0,6!
+            if not !cachePath! == Cache/ (
+
+                :: Filter only relevant file types
+                if !relativeFilePath:~-4!  == .lua          echo %TAB%!relativeFilePath!
+                if !relativeFilePath:~-5!  == .pass         echo %TAB%!relativeFilePath!
+                if !relativeFilePath:~-5!  == .azsl         echo %TAB%!relativeFilePath!
+                if !relativeFilePath:~-6!  == .azsli        echo %TAB%!relativeFilePath!
+                if !relativeFilePath:~-7!  == .shader       echo %TAB%!relativeFilePath!
+                if !relativeFilePath:~-13! == .materialtype echo %TAB%!relativeFilePath!
             
+            )
         )
     )
 ) >> %OUTPUT_FILE%