[new] ATOM-17253 Using AtomTressFX gem as an example to inject hair passes to main pipeline at run-time (#7661)
* Change AtomTressFX passes to write to exsiting DepthLinear buffer instead of creating a new one as output. Signed-off-by: Qing Tao <55564570+VickyAtAZ@users.noreply.github.com> * Added new api in RPI to apply render pipeline changes from FP Signed-off-by: Qing Tao <55564570+VickyAtAZ@users.noreply.github.com> * Update AtomTressFX gem to create hair parent pass at runtime Signed-off-by: Qing Tao <55564570+VickyAtAZ@users.noreply.github.com> * Change Scene::ApplyRenderPipelineChange() to TryApplyRenderPIpelineChanges(). Have TryApplyRenderPIpelineChanges() called automatically when a render pipeline is added to a Scene. Re-apply the render pipeline change when RenderPipeline got recreated (Pass hot-reloading support) Add AddPassBefore() and AddPassAfter() function to RenderPIpeline class. Signed-off-by: Qing Tao <55564570+VickyAtAZ@users.noreply.github.com>monroegm-disable-blank-issue-2
parent
ca3018155e
commit
846e2736a5
@ -0,0 +1,96 @@
|
||||
{
|
||||
"Type": "JsonSerialization",
|
||||
"Version": 1,
|
||||
"ClassName": "PassRequest",
|
||||
"ClassData": {
|
||||
// NOTE: HairParentPass does not write into Depth MSAA from Opaque Pass. If new passes downstream
|
||||
// of HairParentPass will need to use Depth MSAA, HairParentPass will need to be updated to use Depth MSAA
|
||||
// instead of regular Depth as DepthStencil. Specifically, HairResolvePPLL.pass and the associated
|
||||
// .azsl file will need to be updated.
|
||||
"Name": "HairParentPass",
|
||||
// Note: The following two lines represent the choice of rendering pipeline for the hair.
|
||||
// You can either choose to use PPLL or ShortCut by changing TemplateName to HairParentPassTemplate (for PPLL)
|
||||
// or HairParentShortCutPassTemplate (for Shortcut)
|
||||
// "TemplateName": "HairParentPassTemplate",
|
||||
"TemplateName": "HairParentShortCutPassTemplate",
|
||||
"Enabled": true,
|
||||
"Connections": [
|
||||
// Critical to keep DepthLinear as input - used to set the size of the Head PPLL image buffer.
|
||||
// If DepthLinear is not available - connect to another viewport (non MSAA) image.
|
||||
{
|
||||
"LocalSlot": "DepthLinear",
|
||||
"AttachmentRef": {
|
||||
"Pass": "DepthPrePass",
|
||||
"Attachment": "DepthLinear"
|
||||
}
|
||||
},
|
||||
{
|
||||
"LocalSlot": "Depth",
|
||||
"AttachmentRef": {
|
||||
"Pass": "DepthPrePass",
|
||||
"Attachment": "Depth"
|
||||
}
|
||||
},
|
||||
{
|
||||
"LocalSlot": "RenderTargetInputOutput",
|
||||
"AttachmentRef": {
|
||||
"Pass": "OpaquePass",
|
||||
"Attachment": "Output"
|
||||
}
|
||||
},
|
||||
{
|
||||
"LocalSlot": "RenderTargetInputOnly",
|
||||
"AttachmentRef": {
|
||||
"Pass": "OpaquePass",
|
||||
"Attachment": "Output"
|
||||
}
|
||||
},
|
||||
|
||||
// Shadows resources
|
||||
{
|
||||
"LocalSlot": "DirectionalShadowmap",
|
||||
"AttachmentRef": {
|
||||
"Pass": "ShadowPass",
|
||||
"Attachment": "DirectionalShadowmap"
|
||||
}
|
||||
},
|
||||
{
|
||||
"LocalSlot": "DirectionalESM",
|
||||
"AttachmentRef": {
|
||||
"Pass": "ShadowPass",
|
||||
"Attachment": "DirectionalESM"
|
||||
}
|
||||
},
|
||||
{
|
||||
"LocalSlot": "ProjectedShadowmap",
|
||||
"AttachmentRef": {
|
||||
"Pass": "ShadowPass",
|
||||
"Attachment": "ProjectedShadowmap"
|
||||
}
|
||||
},
|
||||
{
|
||||
"LocalSlot": "ProjectedESM",
|
||||
"AttachmentRef": {
|
||||
"Pass": "ShadowPass",
|
||||
"Attachment": "ProjectedESM"
|
||||
}
|
||||
},
|
||||
|
||||
// Lighting Resources
|
||||
{
|
||||
"LocalSlot": "TileLightData",
|
||||
"AttachmentRef": {
|
||||
"Pass": "LightCullingPass",
|
||||
"Attachment": "TileLightData"
|
||||
}
|
||||
},
|
||||
{
|
||||
"LocalSlot": "LightListRemapped",
|
||||
"AttachmentRef": {
|
||||
"Pass": "LightCullingPass",
|
||||
"Attachment": "LightListRemapped"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,38 @@
|
||||
{
|
||||
"Type": "JsonSerialization",
|
||||
"Version": 1,
|
||||
"ClassName": "PassAsset",
|
||||
"ClassData": {
|
||||
"PassTemplate": {
|
||||
"Name": "HairDepthToLinearTemplate",
|
||||
"PassClass": "FullScreenTriangle",
|
||||
"Slots": [
|
||||
{
|
||||
"Name": "Input",
|
||||
"SlotType": "Input",
|
||||
"ScopeAttachmentUsage": "Shader",
|
||||
"ImageViewDesc": {
|
||||
"AspectFlags": [
|
||||
"Depth"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"Name": "Output",
|
||||
"SlotType": "Output",
|
||||
"ScopeAttachmentUsage": "RenderTarget",
|
||||
"LoadStoreAction": {
|
||||
"LoadAction": "DontCare"
|
||||
}
|
||||
}
|
||||
],
|
||||
"PassData": {
|
||||
"$type": "FullscreenTrianglePassData",
|
||||
"ShaderAsset": {
|
||||
"FilePath": "Shaders/PostProcessing/DepthToLinearDepth.shader"
|
||||
},
|
||||
"PipelineViewTag": "MainCamera"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue