123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508 |
- {
- "Type": "JsonSerialization",
- "Version": 1,
- "ClassName": "PassAsset",
- "ClassData": {
- "PassTemplate": {
- "Name": "DeferredOpaqueParentTemplate",
- "PassClass": "ParentPass",
- "Slots": [
- // Inputs...
- {
- "Name": "DirectionalShadowmap",
- "SlotType": "Input"
- },
- {
- "Name": "DirectionalESM",
- "SlotType": "Input"
- },
- {
- "Name": "ProjectedShadowmap",
- "SlotType": "Input"
- },
- {
- "Name": "ProjectedESM",
- "SlotType": "Input"
- },
- {
- "Name": "TileLightData",
- "SlotType": "Input"
- },
- {
- "Name": "LightListRemapped",
- "SlotType": "Input"
- },
- {
- "Name": "DepthLinear",
- "SlotType": "Input"
- },
- // Input/Outputs...
- {
- "Name": "DepthStencil",
- "SlotType": "InputOutput"
- },
- // Outputs...
- {
- "Name": "Output",
- "SlotType": "Output"
- },
- {
- "Name": "DiffuseProbeGridVisualization",
- "SlotType": "Output"
- },
- // SwapChain here is only used to reference the frame height and format
- {
- "Name": "PipelineOutput",
- "SlotType": "InputOutput"
- }
- ],
- "Connections": [
- {
- "LocalSlot": "Output",
- "AttachmentRef": {
- "Pass": "DiffuseSpecularMergePass",
- "Attachment": "Output"
- }
- }
- ],
- "PassRequests": [
- {
- "Name": "DeferredMaterial",
- "TemplateName": "DeferredMaterialPassTemplate",
- "Connections": [
- // Inputs...
- // Input/Outputs...
- {
- "LocalSlot": "DepthStencilInputOutput",
- "AttachmentRef": {
- "Pass": "Parent",
- "Attachment": "DepthStencil"
- }
- }
- ],
- "PassData": {
- "$type": "RasterPassData",
- "DrawListTag": "deferredMaterial",
- "PipelineViewTag": "MainCamera"
- // No PassSrgShaderAsset is needed here because the material pass only packs GBuffers, and doesn't need any per-pass resources
- }
- },
- {
- "Name": "DeferredLighting",
- "TemplateName": "DeferredLightingPassTemplate",
- "Connections": [
- // Inputs...
- {
- "LocalSlot": "DirectionalLightShadowmap",
- "AttachmentRef": {
- "Pass": "Parent",
- "Attachment": "DirectionalShadowmap"
- }
- },
- {
- "LocalSlot": "ExponentialShadowmapDirectional",
- "AttachmentRef": {
- "Pass": "Parent",
- "Attachment": "DirectionalESM"
- }
- },
- {
- "LocalSlot": "ProjectedShadowmap",
- "AttachmentRef": {
- "Pass": "Parent",
- "Attachment": "ProjectedShadowmap"
- }
- },
- {
- "LocalSlot": "ExponentialShadowmapProjected",
- "AttachmentRef": {
- "Pass": "Parent",
- "Attachment": "ProjectedESM"
- }
- },
- {
- "LocalSlot": "TileLightData",
- "AttachmentRef": {
- "Pass": "Parent",
- "Attachment": "TileLightData"
- }
- },
- {
- "LocalSlot": "LightListRemapped",
- "AttachmentRef": {
- "Pass": "Parent",
- "Attachment": "LightListRemapped"
- }
- },
- {
- "LocalSlot": "DepthStencil",
- "AttachmentRef": {
- "Pass": "Parent",
- "Attachment": "DepthStencil"
- }
- },
- {
- "LocalSlot": "InputDepthStencil",
- "AttachmentRef": {
- "Pass": "Parent",
- "Attachment": "DepthStencil"
- }
- },
- {
- "LocalSlot": "BaseColor",
- "AttachmentRef": {
- "Pass": "DeferredMaterial",
- "Attachment": "BaseColorOutput"
- }
- },
- {
- "LocalSlot": "RoughnessMetal",
- "AttachmentRef": {
- "Pass": "DeferredMaterial",
- "Attachment": "RoughnessMetalOutput"
- }
- },
- {
- "LocalSlot": "Normal",
- "AttachmentRef": {
- "Pass": "DeferredMaterial",
- "Attachment": "NormalOutput"
- }
- }
- ]
- },
- {
- "Name": "DiffuseGlobalFullscreenPass",
- "TemplateName": "DiffuseGlobalFullscreenPassTemplate",
- "Connections": [
- {
- "LocalSlot": "DiffuseInputOutput",
- "AttachmentRef": {
- "Pass": "DeferredLighting",
- "Attachment": "DiffuseOutput"
- }
- },
- {
- "LocalSlot": "AlbedoInput",
- "AttachmentRef": {
- "Pass": "DeferredLighting",
- "Attachment": "AlbedoOutput"
- }
- },
- {
- "LocalSlot": "NormalInput",
- "AttachmentRef": {
- "Pass": "DeferredMaterial",
- "Attachment": "NormalOutput"
- }
- },
- {
- "LocalSlot": "DepthStencilTextureInput",
- "AttachmentRef": {
- "Pass": "DeferredMaterial",
- "Attachment": "DepthStencilInputOutput"
- }
- },
- {
- "LocalSlot": "DepthStencilInputOutput",
- "AttachmentRef": {
- "Pass": "DeferredMaterial",
- "Attachment": "DepthStencilInputOutput"
- }
- }
- ]
- },
- {
- "Name": "ReflectionsPass",
- "TemplateName": "ReflectionsParentPassTemplate",
- "Enabled": true,
- "Connections": [
- {
- "LocalSlot": "NormalInput",
- "AttachmentRef": {
- "Pass": "DeferredMaterial",
- "Attachment": "NormalOutput"
- }
- },
- {
- "LocalSlot": "SpecularF0Input",
- "AttachmentRef": {
- "Pass": "DeferredLighting",
- "Attachment": "SpecularF0Output"
- }
- },
- {
- "LocalSlot": "AlbedoInput",
- "AttachmentRef": {
- "Pass": "DeferredLighting",
- "Attachment": "AlbedoOutput"
- }
- },
- {
- "LocalSlot": "DepthStencilInputOutput",
- "AttachmentRef": {
- "Pass": "DeferredMaterial",
- "Attachment": "DepthStencilInputOutput"
- }
- },
- {
- "LocalSlot": "DepthLinear",
- "AttachmentRef": {
- "Pass": "Parent",
- "Attachment": "DepthLinear"
- }
- },
- {
- "LocalSlot": "SpecularInputOutput",
- "AttachmentRef": {
- "Pass": "DeferredLighting",
- "Attachment": "SpecularOutput"
- }
- }
- ]
- },
- {
- "Name": "SkyBoxPass",
- "TemplateName": "SkyBoxTwoOutputsTemplate",
- "Enabled": true,
- "Connections": [
- {
- "LocalSlot": "SpecularInputOutput",
- "AttachmentRef": {
- "Pass": "ReflectionsPass",
- "Attachment": "SpecularInputOutput"
- }
- },
- {
- "LocalSlot": "ReflectionInputOutput",
- "AttachmentRef": {
- "Pass": "ReflectionsPass",
- "Attachment": "ReflectionOutput"
- }
- },
- {
- "LocalSlot": "SkyBoxDepth",
- "AttachmentRef": {
- "Pass": "ReflectionsPass",
- "Attachment": "DepthStencilInputOutput"
- }
- }
- ]
- },
- {
- "Name": "SkyAtmosphereParentPass",
- "TemplateName": "SkyAtmosphereParentTemplate",
- "Enabled": true,
- "Connections": [
- {
- "LocalSlot": "SpecularInputOutput",
- "AttachmentRef": {
- "Pass": "SkyBoxPass",
- "Attachment": "SpecularInputOutput"
- }
- },
- {
- "LocalSlot": "ReflectionInputOutput",
- "AttachmentRef": {
- "Pass": "SkyBoxPass",
- "Attachment": "ReflectionInputOutput"
- }
- },
- {
- "LocalSlot": "SkyBoxDepth",
- "AttachmentRef": {
- "Pass": "SkyBoxPass",
- "Attachment": "SkyBoxDepth"
- }
- },
- {
- "LocalSlot": "DirectionalShadowmap",
- "AttachmentRef": {
- "Pass": "Parent",
- "Attachment": "DirectionalShadowmap"
- }
- },
- {
- "LocalSlot": "DirectionalESM",
- "AttachmentRef": {
- "Pass": "Parent",
- "Attachment": "DirectionalESM"
- }
- }
- ]
- },
- {
- "Name": "ReflectionCompositePass",
- "TemplateName": "ReflectionCompositePassTemplate",
- "Connections": [
- {
- "LocalSlot": "ReflectionInput",
- "AttachmentRef": {
- "Pass": "SkyAtmosphereParentPass",
- "Attachment": "ReflectionInputOutput"
- }
- },
- {
- "LocalSlot": "SpecularInputOutput",
- "AttachmentRef": {
- "Pass": "SkyAtmosphereParentPass",
- "Attachment": "SpecularInputOutput"
- }
- },
- {
- "LocalSlot": "DepthStencilInputOutput",
- "AttachmentRef": {
- "Pass": "SkyBoxPass",
- "Attachment": "SkyBoxDepth"
- }
- }
- ],
- "PassData": {
- "$type": "FullscreenTrianglePassData",
- "ShaderAsset": {
- "FilePath": "Shaders/Reflections/ReflectionComposite.shader"
- },
- "StencilRef": 1, // See RenderCommon.h and ReflectionComposite.shader
- "PipelineViewTag": "MainCamera"
- }
- },
- {
- "Name": "MSAAResolveDiffusePass",
- "TemplateName": "MSAAResolveColorTemplate",
- "Connections": [
- {
- "LocalSlot": "Input",
- "AttachmentRef": {
- "Pass": "DiffuseGlobalFullscreenPass",
- "Attachment": "DiffuseInputOutput"
- }
- }
- ]
- },
- {
- "Name": "MSAAResolveSpecularPass",
- "TemplateName": "MSAAResolveCustomTemplate",
- "Connections": [
- {
- "LocalSlot": "Input",
- "AttachmentRef": {
- "Pass": "ReflectionCompositePass",
- "Attachment": "SpecularInputOutput"
- }
- }
- ],
- "PassData": {
- "$type": "FullscreenTrianglePassData",
- "ShaderAsset": {
- "FilePath": "Shaders/PostProcessing/MSAAResolveCustom.shader"
- },
- "PipelineViewTag": "MainCamera",
- "ShaderDataMappings": {
- "UintMappings": [
- {
- "Name": "enableNeighborClamping",
- "Value": 1
- }
- ],
- "FloatMappings": [
- {
- "Name": "maxNeighborContrast",
- "Value": 1.5
- }
- ]
- }
- }
- },
- // TODO(DeferredPOC): Try to hook up subsurface scattering again
- //{
- // "Name": "MSAAResolveScatterDistancePass",
- // "TemplateName": "MSAAResolveColorTemplate",
- // "Connections": [
- // {
- // "LocalSlot": "Input",
- // "AttachmentRef": {
- // "Pass": "ForwardSubsurface",
- // "Attachment": "ScatterDistanceOutput"
- // }
- // }
- // ]
- //},
- //{
- // "Name": "SubsurfaceScatteringPass",
- // "TemplateName": "SubsurfaceScatteringPassTemplate",
- // "Enabled": true,
- // "Connections": [
- // {
- // "LocalSlot": "InputDiffuse",
- // "AttachmentRef": {
- // "Pass": "MSAAResolveDiffusePass",
- // "Attachment": "Output"
- // }
- // },
- // {
- // "LocalSlot": "InputLinearDepth",
- // "AttachmentRef": {
- // "Pass": "Parent",
- // "Attachment": "DepthLinear"
- // }
- // },
- // {
- // "LocalSlot": "InputScatterDistance",
- // "AttachmentRef": {
- // "Pass": "MSAAResolveScatterDistancePass",
- // "Attachment": "Output"
- // }
- // }
- // ],
- // "PassData": {
- // "$type": "ComputePassData",
- // "ShaderAsset": {
- // "FilePath": "Shaders/PostProcessing/ScreenSpaceSubsurfaceScatteringCS.shader"
- // },
- // "FullscreenDispatch": true,
- // "PipelineViewTag": "MainCamera"
- // }
- //},
- {
- "Name": "Ssao",
- "TemplateName": "SsaoParentTemplate",
- "Connections": [
- {
- "LocalSlot": "Modulate",
- "AttachmentRef": {
- "Pass": "MSAAResolveDiffusePass",
- "Attachment": "Output"
- }
- // TODO(DeferredPOC): Try to hook up subsurface scattering again
- //"AttachmentRef": {
- // "Pass": "SubsurfaceScatteringPass",
- // "Attachment": "Output"
- //}
- }
- ]
- },
- {
- "Name": "DiffuseSpecularMergePass",
- "TemplateName": "DiffuseSpecularMergeTemplate",
- "Connections": [
- {
- "LocalSlot": "InputDiffuse",
- "AttachmentRef": {
- "Pass": "Ssao",
- "Attachment": "Output"
- }
- },
- {
- "LocalSlot": "InputSpecular",
- "AttachmentRef": {
- "Pass": "MSAAResolveSpecularPass",
- "Attachment": "Output"
- }
- }
- ]
- }
- ]
- }
- }
- }
|