123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340 |
- {
- "Type": "JsonSerialization",
- "Version": 1,
- "ClassName": "PassAsset",
- "ClassData": {
- "PassTemplate": {
- "Name": "HairParentPassTemplate",
- "PassClass": "ParentPass",
- "Slots": [
- {
- "Name": "RenderTargetInputOutput",
- "SlotType": "InputOutput",
- "ScopeAttachmentUsage": "RenderTarget"
- },
- {
- "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"
- }
- }
- ]
- },
- {
- "Name": "HairPPLLRasterPass",
- "TemplateName": "HairPPLLRasterPassTemplate",
- "Enabled": true,
- "Connections": [
- {
- "LocalSlot": "SkinnedHairSharedBuffer",
- "AttachmentRef": {
- "Pass": "HairUpdateFollowHairComputePass",
- "Attachment": "SkinnedHairSharedBuffer"
- }
- },
- // Keep DepthLinear as input - used to set the size of the Head PPLL image buffer.
- // If DepthLinear is not availbale - connect to another viewport (non MSAA) image.
- {
- "LocalSlot": "DepthLinear",
- "AttachmentRef": {
- "Pass": "Parent",
- "Attachment": "DepthLinear"
- }
- },
- {
- "LocalSlot": "Depth",
- "AttachmentRef": {
- "Pass": "Parent",
- "Attachment": "Depth"
- }
- },
- {
- "LocalSlot": "RenderTargetInputOutput",
- "AttachmentRef": {
- "Pass": "Parent",
- "Attachment": "RenderTargetInputOutput"
- }
- }
- ]
- },
- {
- "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
- }
- ]
- },
- {
- "Name": "HairPPLLResolvePass",
- "TemplateName": "HairPPLLResolvePassTemplate",
- "Enabled": true,
- "Connections": [
- // General + Render Target resources
- {
- "LocalSlot": "RenderTargetInputOutput",
- "AttachmentRef": {
- "Pass": "Parent",
- "Attachment": "RenderTargetInputOutput"
- }
- },
- {
- "LocalSlot": "RenderTargetCopy",
- "AttachmentRef": {
- "Pass": "RenderTargetCopyPass",
- "Attachment": "Output"
- }
- },
- {
- "LocalSlot": "Depth",
- "AttachmentRef": {
- "Pass": "Parent",
- "Attachment": "Depth"
- }
- },
- {
- "LocalSlot": "DepthLinear",
- "AttachmentRef": {
- "Pass": "Parent",
- "Attachment": "DepthLinear"
- }
- },
- // 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"
- }
- },
- // PPLL Resources
- {
- "LocalSlot": "PerPixelListHead",
- "AttachmentRef": {
- "Pass": "HairPPLLRasterPass",
- "Attachment": "PerPixelListHead"
- }
- },
- {
- "LocalSlot": "PerPixelLinkedList",
- "AttachmentRef": {
- "Pass": "HairPPLLRasterPass",
- "Attachment": "PerPixelLinkedList"
- }
- }
- ]
- },
- {
- // 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": "HairPPLLResolvePass",
- "Attachment": "Depth"
- }
- },
- {
- "LocalSlot": "Output",
- "AttachmentRef": {
- "Pass": "Parent",
- "Attachment": "DepthLinear"
- }
- }
- ]
- }
- ]
- }
- }
- }
-
|