Files
o3de/Gems/AtomTressFX/Assets/Passes/HairResolvePPLL.pass
Qing Tao 846e2736a5 [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>
2022-02-17 08:50:50 -08:00

152 lines
5.7 KiB
Plaintext

{
"Type": "JsonSerialization",
"Version": 1,
"ClassName": "PassAsset",
"ClassData": {
"PassTemplate": {
"Name": "HairPPLLResolvePassTemplate",
"PassClass": "HairPPLLResolvePass",
"Slots": [
//------ General Input/Output resources and Render Target ------
{
"Name": "RenderTargetInputOutput",
"SlotType": "InputOutput",
"ScopeAttachmentUsage": "RenderTarget",
"LoadStoreAction": {
"LoadAction": "Load",
"StoreAction": "Store"
}
},
{ // Will be used to get the background color for the hair blending
"Name": "RenderTargetCopy",
"SlotType": "Input",
"ScopeAttachmentUsage": "Shader",
"ShaderInputName": "m_frameBuffer"
},
{ // Used to get the transform from screen space to world space.
"Name": "DepthLinear",
"SlotType": "Input",
"ShaderInputName": "m_linearDepth",
"ScopeAttachmentUsage": "Shader"
},
{ // The depth buffer will be used to write the closest hair fragment depth
"Name": "Depth",
"SlotType": "InputOutput",
"ScopeAttachmentUsage": "DepthStencil",
"LoadStoreAction": {
"LoadAction": "Load",
"StoreAction": "Store"
}
},
//------------- Shadowing Resources -------------
{
"Name": "DirectionalShadowmap",
"ShaderInputName": "m_directionalLightShadowmap",
"SlotType": "Input",
"ScopeAttachmentUsage": "Shader",
"ImageViewDesc": {
"IsArray": 1
}
},
{
"Name": "DirectionalESM",
"ShaderInputName": "m_directionalLightExponentialShadowmap",
"SlotType": "Input",
"ScopeAttachmentUsage": "Shader",
"ImageViewDesc": {
"IsArray": 1
}
},
{
"Name": "ProjectedShadowmap",
"ShaderInputName": "m_projectedShadowmaps",
"SlotType": "Input",
"ScopeAttachmentUsage": "Shader",
"ImageViewDesc": {
"IsArray": 1
}
},
{
"Name": "ProjectedESM",
"ShaderInputName": "m_projectedExponentialShadowmap",
"SlotType": "Input",
"ScopeAttachmentUsage": "Shader",
"ImageViewDesc": {
"IsArray": 1
}
},
//------------- Lighting Resources -------------
{
"Name": "BRDFTextureInput",
"ShaderInputName": "m_brdfMap",
"SlotType": "Input",
"ScopeAttachmentUsage": "Shader"
},
{
"Name": "TileLightData",
"SlotType": "Input",
"ShaderInputName": "m_tileLightData",
"ScopeAttachmentUsage": "Shader"
},
{
"Name": "LightListRemapped",
"SlotType": "Input",
"ShaderInputName": "m_lightListRemapped",
"ScopeAttachmentUsage": "Shader"
},
//---------- PPLL Resources -----------
{
"Name": "PerPixelListHead",
"ShaderInputName": "m_fragmentListHead",
"SlotType": "Input", // Read only - the reset is done before the fill pass
"ScopeAttachmentUsage": "Shader",
"LoadStoreAction": {
"LoadAction": "Load",
"StoreAction": "DontCare"
}
},
{
"Name": "PerPixelLinkedList",
"ShaderInputName": "m_linkedListNodes",
"SlotType": "Input",
"ScopeAttachmentUsage": "Shader",
"LoadStoreAction": {
"LoadAction": "Load",
"StoreAction": "DontCare"
}
}
],
"ImageAttachments": [
{
"Name": "BRDFTexture",
"Lifetime": "Imported",
"AssetRef": {
"FilePath": "Textures/BRDFTexture.attimage"
}
}
],
"Connections": [
{
"LocalSlot": "BRDFTextureInput",
"AttachmentRef": {
"Pass": "This",
"Attachment": "BRDFTexture"
}
}
],
"PassData": {
"$type": "FullscreenTrianglePassData",
"PipelineViewTag": "MainCamera",
"ShaderAsset": {
// Looking for it in the Shaders directory relative to the Assets directory
"FilePath": "Shaders/HairRenderingResolvePPLL.shader"
}
}
}
}
}