123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381 |
- {
- "Type": "JsonSerialization",
- "Version": 1,
- "ClassName": "PassAsset",
- "ClassData": {
- "PassTemplate": {
- "Name": "HairParentShortCutPassTemplate",
- "PassClass": "ParentPass",
- "Slots": [
- {
- "Name": "RenderTargetInputOutput",
- "SlotType": "InputOutput",
- "ScopeAttachmentUsage": "RenderTarget"
- },
- {
- // used for copy from MSAA to regular RT
- "Name": "RenderTargetInputOnly",
- "SlotType": "Input",
- "ScopeAttachmentUsage": "Shader"
- },
- // This is the depth stencil buffer that is to be used by the fill pass
- // to early reject pixels by depth and in the resolve pass to write the
- // the hair depth
- {
- "Name": "Depth",
- "SlotType": "InputOutput",
- "ScopeAttachmentUsage": "DepthStencil"
- },
- // Used to set the size of the Head PPLL image buffer.
- {
- "Name": "DepthLinear",
- "SlotType": "InputOutput"
- },
- // Lights & Shadows resources
- {
- "Name": "DirectionalShadowmap",
- "SlotType": "Input"
- },
- {
- "Name": "DirectionalESM",
- "SlotType": "Input"
- },
- {
- "Name": "ProjectedShadowmap",
- "SlotType": "Input"
- },
- {
- "Name": "ProjectedESM",
- "SlotType": "Input"
- },
- {
- "Name": "TileLightData",
- "SlotType": "Input"
- },
- {
- "Name": "LightListRemapped",
- "SlotType": "Input"
- }
- ],
- "PassRequests": [
- {
- "Name": "HairGlobalShapeConstraintsComputePass",
- "TemplateName": "HairGlobalShapeConstraintsComputePassTemplate",
- "Enabled": true
- },
- {
- "Name": "HairCalculateStrandLevelDataComputePass",
- "TemplateName": "HairCalculateStrandLevelDataComputePassTemplate",
- "Enabled": true,
- "Connections": [
- {
- "LocalSlot": "SkinnedHairSharedBuffer",
- "AttachmentRef": {
- "Pass": "HairGlobalShapeConstraintsComputePass",
- "Attachment": "SkinnedHairSharedBuffer"
- }
- }
- ]
- },
- {
- "Name": "HairVelocityShockPropagationComputePass",
- "TemplateName": "HairVelocityShockPropagationComputePassTemplate",
- "Enabled": true,
- "Connections": [
- {
- "LocalSlot": "SkinnedHairSharedBuffer",
- "AttachmentRef": {
- "Pass": "HairCalculateStrandLevelDataComputePass",
- "Attachment": "SkinnedHairSharedBuffer"
- }
- }
- ]
- },
- {
- "Name": "HairLocalShapeConstraintsComputePass",
- "TemplateName": "HairLocalShapeConstraintsComputePassTemplate",
- "Enabled": true,
- "Connections": [
- {
- "LocalSlot": "SkinnedHairSharedBuffer",
- "AttachmentRef": {
- "Pass": "HairVelocityShockPropagationComputePass",
- "Attachment": "SkinnedHairSharedBuffer"
- }
- }
- ]
- },
- {
- "Name": "HairLengthConstraintsWindAndCollisionComputePass",
- "TemplateName": "HairLengthConstraintsWindAndCollisionComputePassTemplate",
- "Enabled": true,
- "Connections": [
- {
- "LocalSlot": "SkinnedHairSharedBuffer",
- "AttachmentRef": {
- "Pass": "HairLocalShapeConstraintsComputePass",
- "Attachment": "SkinnedHairSharedBuffer"
- }
- }
- ]
- },
- {
- "Name": "HairUpdateFollowHairComputePass",
- "TemplateName": "HairUpdateFollowHairComputePassTemplate",
- "Enabled": true,
- "Connections": [
- {
- "LocalSlot": "SkinnedHairSharedBuffer",
- "AttachmentRef": {
- "Pass": "HairLengthConstraintsWindAndCollisionComputePass",
- "Attachment": "SkinnedHairSharedBuffer"
- }
- }
- ]
- },
- // Render Target Copy from MS to Regular
- {
- "Name": "RenderTargetCopyPass",
- "TemplateName": "FullscreenCopyTemplate",
- "Connections": [
- {
- "LocalSlot": "Input",
- "AttachmentRef": {
- "Pass": "Parent",
- "Attachment": "RenderTargetInputOnly"
- }
- },
- {
- "LocalSlot": "Output",
- "AttachmentRef": {
- "Pass": "This",
- "Attachment": "Output"
- }
- }
- ],
- "ImageAttachments": [
- {
- "Name": "Output",
- "SizeSource": {
- "Source": {
- "Pass": "This",
- "Attachment": "Input"
- }
- },
- "FormatSource": {
- "Pass": "This",
- "Attachment": "Input"
- },
- "GenerateFullMipChain": false
- }
- ]
- },
- // Rendering Passes
- {
- "Name": "HairShortCutGeometryDepthAlphaPass",
- "TemplateName": "HairShortCutGeometryDepthAlphaPassTemplate",
- "Enabled": true,
- "Connections": [
- {
- "LocalSlot": "SkinnedHairSharedBuffer",
- "AttachmentRef": {
- "Pass": "HairUpdateFollowHairComputePass",
- "Attachment": "SkinnedHairSharedBuffer"
- }
- },
- {
- "LocalSlot": "Depth",
- "AttachmentRef": {
- "Pass": "Parent",
- "Attachment": "Depth"
- }
- },
- {
- "LocalSlot": "HairDepthsTextureArray",
- "AttachmentRef": {
- "Pass": "This",
- "Attachment": "HairDepthsTextureArray"
- }
- }
- ]
- },
- {
- "Name": "HairShortCutResolveDepthPass",
- "TemplateName": "HairShortCutResolveDepthPassTemplate",
- "Enabled": true,
- "Connections": [
- {
- "LocalSlot": "Depth",
- "AttachmentRef": {
- "Pass": "Parent",
- "Attachment": "Depth"
- }
- },
- {
- "LocalSlot": "HairDepthsTextureArray",
- "AttachmentRef": {
- "Pass": "HairShortCutGeometryDepthAlphaPass",
- "Attachment": "HairDepthsTextureArray"
- }
- }
- ]
- },
- {
- "Name": "HairShortCutGeometryShadingPass",
- "TemplateName": "HairShortCutGeometryShadingPassTemplate",
- "Enabled": true,
- "Connections": [
- {
- // The final render target - this is MSAA mode RT - would it be cheaper to
- // use non-MSAA and then copy?
- "LocalSlot": "RenderTargetInputOutput",
- "AttachmentRef": {
- "Pass": "Parent",
- "Attachment": "RenderTargetInputOutput"
- }
- },
- {
- "LocalSlot": "DepthLinear",
- "AttachmentRef": {
- "Pass": "Parent",
- "Attachment": "DepthLinear"
- }
- },
- {
- "LocalSlot": "AccumulatedInverseAlpha",
- "AttachmentRef": {
- "Pass": "HairShortCutGeometryDepthAlphaPass",
- "Attachment": "InverseAlphaRTOutput"
- }
- },
- {
- "LocalSlot": "Depth",
- "AttachmentRef": {
- "Pass": "Parent",
- "Attachment": "Depth"
- }
- },
- {
- "LocalSlot": "SkinnedHairSharedBuffer",
- "AttachmentRef": {
- "Pass": "HairUpdateFollowHairComputePass",
- "Attachment": "SkinnedHairSharedBuffer"
- }
- },
- // Shadows resources
- {
- "LocalSlot": "DirectionalShadowmap",
- "AttachmentRef": {
- "Pass": "Parent",
- "Attachment": "DirectionalShadowmap"
- }
- },
- {
- "LocalSlot": "DirectionalESM",
- "AttachmentRef": {
- "Pass": "Parent",
- "Attachment": "DirectionalESM"
- }
- },
- {
- "LocalSlot": "ProjectedShadowmap",
- "AttachmentRef": {
- "Pass": "Parent",
- "Attachment": "ProjectedShadowmap"
- }
- },
- {
- "LocalSlot": "ProjectedESM",
- "AttachmentRef": {
- "Pass": "Parent",
- "Attachment": "ProjectedESM"
- }
- },
- // Lights Resources
- {
- "LocalSlot": "TileLightData",
- "AttachmentRef": {
- "Pass": "Parent",
- "Attachment": "TileLightData"
- }
- },
- {
- "LocalSlot": "LightListRemapped",
- "AttachmentRef": {
- "Pass": "Parent",
- "Attachment": "LightListRemapped"
- }
- }
- ]
- },
- {
- "Name": "HairShortCutResolveColorPass",
- "TemplateName": "HairShortCutResolveColorPassTemplate",
- "Enabled": true,
- "Connections": [
- {
- // The final render target - this is MSAA mode RT - would it be cheaper to
- // use non-MSAA and then copy?
- "LocalSlot": "RenderTargetInputOutput",
- "AttachmentRef": {
- "Pass": "Parent",
- "Attachment": "RenderTargetInputOutput"
- }
- },
- {
- "LocalSlot": "AccumulatedInverseAlpha",
- "AttachmentRef": {
- "Pass": "HairShortCutGeometryDepthAlphaPass",
- "Attachment": "InverseAlphaRTOutput"
- }
- },
- {
- "LocalSlot": "HairColorTexture",
- "AttachmentRef": {
- "Pass": "HairShortCutGeometryShadingPass",
- "Attachment": "HairColorRenderTarget"
- }
- }
- ]
- },
- {
- // This pass copies the updated depth buffer (now contains hair depth) to linear depth texture
- // for downstream passes to use. This can be optimized even further by writing into the stencil
- // buffer pixels that were touched by HairPPLLResolvePass hence preventing depth update unless
- // it is hair.
- "Name": "DepthToDepthLinearPass",
- "TemplateName": "HairDepthToLinearTemplate",
- "Enabled": true,
- "Connections": [
- {
- "LocalSlot": "Input",
- "AttachmentRef": {
- "Pass": "HairShortCutResolveDepthPass",
- "Attachment": "Depth"
- }
- },
- {
- "LocalSlot": "Output",
- "AttachmentRef": {
- "Pass": "Parent",
- "Attachment": "DepthLinear"
- }
- }
- ]
- }
- ]
- }
- }
- }
|