Przeglądaj źródła

Merge pull request #552 from aws-lumberyard-dev/Atom/santorac/ExposeDeferredPipelineToMaterialEditor

Minor updates to expose the prototype deferred pipeline to the Materi…
santorac 2 lat temu
rodzic
commit
a279ff39e4

+ 13 - 0
Gem/Code/Source/AtomSampleViewerSystemComponent.cpp

@@ -121,6 +121,19 @@ namespace AtomSampleViewer
 
         AZ::TickBus::Handler::BusConnect();
         CrySystemEventBus::Handler::BusConnect();
+
+        // Add customized pass classes
+        auto* passSystem = AZ::RPI::PassSystemInterface::Get();
+
+        // Load ASV's own pass templates mapping
+        // It can be loaded here and it doesn't need be added via OnReadyLoadTemplatesEvent::Handler
+        // since the first render pipeline is created after this point.
+        const char* asvPassTemplatesFile = "Passes/ASV/PassTemplates.azasset";
+        bool loaded = passSystem->LoadPassTemplateMappings(asvPassTemplatesFile);
+        if (!loaded)
+        {
+            AZ_Fatal("SampleComponentManager", "Failed to load AtomSampleViewer's pass templates at %s", asvPassTemplatesFile);
+        }
     }
 
     void AtomSampleViewerSystemComponent::Deactivate()

+ 0 - 11
Gem/Code/Source/SampleComponentManager.cpp

@@ -426,17 +426,6 @@ namespace AtomSampleViewer
         auto* passSystem = RPI::PassSystemInterface::Get();
         passSystem->AddPassCreator(Name("RHISamplePass"), &AtomSampleViewer::RHISamplePass::Create);
 
-        // Load ASV's own pass templates mapping
-        // It can be loaded here and it doesn't need be added via OnReadyLoadTemplatesEvent::Handler
-        // since the first render pipeline is created after this point.
-        const char* asvPassTemplatesFile = "Passes/ASV/PassTemplates.azasset";
-        bool loaded = passSystem->LoadPassTemplateMappings(asvPassTemplatesFile);
-        if (!loaded)
-        {
-            AZ_Fatal("SampleComponentManager", "Failed to load AtomSampleViewer's pass templates at %s", asvPassTemplatesFile);
-            return;
-        }
-
         // Use scene and render pipeline for RHI samples as default scene and render pipeline
         CreateSceneForRHISample();
 

+ 2 - 2
Gem/Code/Source/SponzaBenchmarkComponent.cpp

@@ -197,7 +197,7 @@ namespace AtomSampleViewer
 
     void SponzaBenchmarkComponent::OnTick(float deltaTime, AZ::ScriptTimePoint timePoint)
     {
-        AZ_PROFILE_DATAPOINT(AzRender, deltaTime, "Frame Time");
+        AZ_PROFILE_DATAPOINT(AzRender, deltaTime, L"Frame Time");
 
         // Camera Configuration
         {
@@ -323,7 +323,7 @@ namespace AtomSampleViewer
             BenchmarkLoadEnd();
         }
 
-        AZ_PROFILE_DATAPOINT(AzRender, m_currentLoadBenchmarkData.m_totalMBLoaded, "MB Loaded Off Disk");
+        AZ_PROFILE_DATAPOINT(AzRender, m_currentLoadBenchmarkData.m_totalMBLoaded, L"MB Loaded Off Disk");
     }
 
     void SponzaBenchmarkComponent::BenchmarkLoadStart()

+ 16 - 0
Passes/PrototypeDeferredPipeline/DeferredRenderPipeline.azasset

@@ -0,0 +1,16 @@
+{
+    "Type": "JsonSerialization",
+    "Version": 1,
+    "ClassName": "RenderPipelineDescriptor",
+    "ClassData": {
+        "Name": "DeferredPipeline",
+        "MainViewTag": "MainCamera",
+        "RootPassTemplate": "DeferredPipelineTemplate",
+        "AllowModification": true,
+        "RenderSettings": {
+            "MultisampleState": {
+                "samples": 4
+            }
+        }
+    }
+}