Преглед на файлове

Disable MSAA and Enable TAA

This change enables TAA instead of MSAA to improve performance

Signed-off-by: alexpete <[email protected]>
alexpete преди 2 години
родител
ревизия
64d6a93c3d
променени са 3 файла, в които са добавени 243 реда и са изтрити 0 реда
  1. 16 0
      Project/Passes/MainRenderPipeline.azasset
  2. 222 0
      Project/Passes/PostProcessParent.pass
  3. 5 0
      Project/Registry/assetprocessor_settings.setreg

+ 16 - 0
Project/Passes/MainRenderPipeline.azasset

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

+ 222 - 0
Project/Passes/PostProcessParent.pass

@@ -0,0 +1,222 @@
+{
+    "Type": "JsonSerialization",
+    "Version": 1,
+    "ClassName": "PassAsset",
+    "ClassData": {
+        "PassTemplate": {
+            "Name": "PostProcessParentTemplate",
+            "PassClass": "ParentPass",
+            "Slots": [
+                // Inputs...
+                {
+                    "Name": "LightingInput",
+                    "SlotType": "Input"
+                },
+                {
+                    "Name": "Depth",
+                    "SlotType": "Input"
+                },
+                {
+                    "Name": "MotionVectors",
+                    "SlotType": "Input"
+                },
+                // SwapChain here is only used to reference the frame height and format
+                {
+                    "Name": "PipelineOutput",
+                    "SlotType": "InputOutput"
+                },
+                // Outputs...
+                {
+                    "Name": "Output",
+                    "SlotType": "Output"
+                },
+                // Debug Outputs...
+                {
+                    "Name": "RawLightingOutput",
+                    "SlotType": "Output"
+                },
+                {
+                    "Name": "LuminanceMipChainOutput",
+                    "SlotType": "Output"
+                }
+            ],
+            "Connections": [
+                {
+                    "LocalSlot": "Output",
+                    "AttachmentRef": {
+                        "Pass": "ChromaticAberrationPass",
+                        "Attachment": "Output"
+                    }
+                },
+                {
+                    "LocalSlot": "RawLightingOutput",
+                    "AttachmentRef": {
+                        "Pass": "BloomPass",
+                        "Attachment": "InputOutput"
+                    }
+                },
+                {
+                    "LocalSlot": "LuminanceMipChainOutput",
+                    "AttachmentRef": {
+                        "Pass": "LightAdaptation",
+                        "Attachment": "LuminanceMipChainOutput"
+                    }
+                }
+            ],
+            "PassRequests": [
+                {
+                    "Name": "SMAA1xApplyLinearHDRColorPass",
+                    "TemplateName": "SMAA1xApplyLinearHDRColorTemplate",
+                    "Connections": [
+                        {
+                            "LocalSlot": "InputColor",
+                            "AttachmentRef": {
+                                "Pass": "Parent",
+                                "Attachment": "LightingInput"
+                            }
+                        },
+                        {
+                            "LocalSlot": "InputDepth",
+                            "AttachmentRef": {
+                                "Pass": "Parent",
+                                "Attachment": "Depth"
+                            }
+                        }
+                    ]
+                },
+                {
+                    "Name": "TaaPass",
+                    "TemplateName": "TaaTemplate",
+                    "Enabled": true,
+                    "Connections": [
+                        {
+                            "LocalSlot": "InputColor",
+                            "AttachmentRef": {
+                                "Pass": "SMAA1xApplyLinearHDRColorPass",
+                                "Attachment": "OutputColor"
+                            }
+                        },
+                        {
+                            "LocalSlot": "InputDepth",
+                            "AttachmentRef": {
+                                "Pass": "Parent",
+                                "Attachment": "Depth"
+                            }
+                        },
+                        {
+                            "LocalSlot": "MotionVectors",
+                            "AttachmentRef": {
+                                "Pass": "Parent",
+                                "Attachment": "MotionVectors"
+                            }
+                        }
+                    ]
+                },
+                // Todo: remove the old depth of field implementation and rename NewDepthOfField -> DepthOfField
+                //{
+                //    "Name": "DepthOfFieldPass",
+                //    "TemplateName": "DepthOfFieldTemplate",
+                //    "Enabled": true,
+                //    "Connections": [
+                //        {
+                //            "LocalSlot": "DoFColorInput",
+                //            "AttachmentRef": {
+                //                "Pass": "TaaPass",
+                //                "Attachment": "OutputColor"
+                //            }
+                //        },
+                //        {
+                //            "LocalSlot": "DoFDepthInput",
+                //            "AttachmentRef": {
+                //                "Pass": "Parent",
+                //                "Attachment": "Depth"
+                //            }
+                //        }
+                //    ]
+                //},
+                {
+                    "Name": "DepthOfFieldPass",
+                    "TemplateName": "NewDepthOfFieldTemplate",
+                    "Enabled": true,
+                    "Connections": [
+                        {
+                            "LocalSlot": "LightingBuffer",
+                            "AttachmentRef": {
+                                "Pass": "TaaPass",
+                                "Attachment": "OutputColor"
+                            }
+                        },
+                        {
+                            "LocalSlot": "Depth",
+                            "AttachmentRef": {
+                                "Pass": "Parent",
+                                "Attachment": "Depth"
+                            }
+                        }
+                    ]
+                },
+                {
+                    "Name": "BloomPass",
+                    "TemplateName": "BloomPassTemplate",
+                    "Enabled": true,
+                    "Connections": [
+                        {
+                            "LocalSlot": "InputOutput",
+                            "AttachmentRef": {
+                                "Pass": "DepthOfFieldPass",
+                                "Attachment": "LightingBuffer"
+                            }
+                        }
+                    ]
+                },
+                {
+                    "Name": "LightAdaptation",
+                    "TemplateName": "LightAdaptationParentTemplate",
+                    "Connections": [
+                        {
+                            "LocalSlot": "LightingInput",
+                            "AttachmentRef": {
+                                "Pass": "BloomPass",
+                                "Attachment": "InputOutput"
+                            }
+                        },
+                        {
+                            "LocalSlot": "PipelineOutput",
+                            "AttachmentRef": {
+                                "Pass": "Parent",
+                                "Attachment": "PipelineOutput"
+                            }
+                        }
+                    ]
+                },
+                {
+                    "Name": "ContrastAdaptiveSharpeningPass",
+                    "TemplateName": "ContrastAdaptiveSharpeningTemplate",
+                    "Enabled": true,
+                    "Connections": [
+                        {
+                            "LocalSlot": "InputColor",
+                            "AttachmentRef": {
+                                "Pass": "LightAdaptation",
+                                "Attachment": "Output"
+                            }
+                        }
+                    ]
+                },
+                {
+                    "Name": "ChromaticAberrationPass",
+                    "TemplateName": "ChromaticAberrationTemplate",
+                    "Connections": [
+                        {
+                            "LocalSlot": "Input",
+			                "AttachmentRef": {
+                                "Pass": "ContrastAdaptiveSharpeningPass",
+                                "Attachment": "OutputColor"
+			                }
+			            }
+		            ]
+		        }
+            ]
+        }
+    }
+}

+ 5 - 0
Project/Registry/assetprocessor_settings.setreg

@@ -16,6 +16,11 @@
                     "watch": "@PROJECTROOT@/Registry",
                     "recursive": 1,
                     "order": 3
+                },
+                "ScanFolder Project/Passes": {
+                    "watch": "@PROJECTROOT@/Passes",
+                    "recursive": 1,
+                    "order": 4
                 }
             }
         }