Updated the EnvironmentCubeMapPipeline to match recent changes to the MainPipeline.

Set the multisample state on the EnvironmentCubeMapPipeline render settings.
This commit is contained in:
dmcdiar
2021-04-18 14:57:52 -07:00
parent cc6393b074
commit 456bcb3bf9
5 changed files with 45 additions and 112 deletions
@@ -49,11 +49,6 @@
"IsArray": 1
}
},
{
"Name": "DepthStencilInputOutput",
"SlotType": "InputOutput",
"ScopeAttachmentUsage": "DepthStencil"
},
{
"Name": "TileLightData",
"SlotType": "Input",
@@ -66,6 +61,13 @@
"ShaderInputName": "m_lightListRemapped",
"ScopeAttachmentUsage": "Shader"
},
// Input/Outputs...
{
"Name": "DepthStencilInputOutput",
"SlotType": "InputOutput",
"ScopeAttachmentUsage": "DepthStencil"
},
// Outputs...
{
"Name": "DiffuseOutput",
"SlotType": "Output",
@@ -222,11 +224,12 @@
"Attachment": "Output"
}
},
"MultisampleSource": {
"Pass": "This",
"Attachment": "DepthStencilInputOutput"
},
"ImageDescriptor": {
"Format": "R8G8B8A8_UNORM",
"MultisampleState": {
"samples": 4
},
"SharedQueueMask": "Graphics"
}
},
@@ -9,7 +9,8 @@
"Slots": [
{
"Name": "Output",
"SlotType": 2
"SlotType": "InputOutput",
"ScopeAttachmentUsage": "RenderTarget"
}
],
"PassRequests": [
@@ -101,13 +102,8 @@
]
},
{
"Name": "DepthMSAAPass",
"TemplateName": "EnvironmentCubeMapDepthMSAAPassTemplate",
"PassData": {
"$type": "RasterPassData",
"DrawListTag": "depth",
"PipelineViewTag": "MainCamera"
},
"Name": "DepthPrePass",
"TemplateName": "DepthMSAAParentTemplate",
"Connections": [
{
"LocalSlot": "SkinnedMeshes",
@@ -115,70 +111,11 @@
"Pass": "SkinningPass",
"Attachment": "SkinnedMeshOutputStream"
}
}
]
},
// The light culling system can do highly accurate culling of transparent objects but it needs
// more depth information than the opaque geometry pass can provide
// Specifically the minimum and maximum depth of transparent objects
{
"Name": "DepthTransparentMinPass",
"TemplateName": "DepthPassTemplate",
"PassData": {
"$type": "RasterPassData",
"DrawListTag": "depthTransparentMin",
"PipelineViewTag": "MainCamera"
},
"Connections": [
{
"LocalSlot": "SkinnedMeshes",
"AttachmentRef": {
"Pass": "SkinningPass",
"Attachment": "SkinnedMeshOutputStream"
}
}
]
},
{
"Name": "DepthTransparentMaxPass",
"TemplateName": "DepthMaxPassTemplate",
"PassData": {
"$type": "RasterPassData",
"DrawListTag": "depthTransparentMax",
"PipelineViewTag": "MainCamera"
},
"Connections": [
{
"LocalSlot": "SkinnedMeshes",
"AttachmentRef": {
"Pass": "SkinningPass",
"Attachment": "SkinnedMeshOutputStream"
}
}
]
},
{
"Name": "LightCullingTilePreparePass",
"TemplateName": "LightCullingTilePrepareMSAATemplate",
"Connections": [
{
"LocalSlot": "Depth",
"AttachmentRef": {
"Pass": "DepthMSAAPass",
"Attachment": "Output"
}
},
{
"LocalSlot": "DepthTransparentMin",
"LocalSlot": "SwapChainOutput",
"AttachmentRef": {
"Pass": "DepthTransparentMinPass",
"Attachment": "Output"
}
},
{
"LocalSlot": "DepthTransparentMax",
"AttachmentRef": {
"Pass": "DepthTransparentMaxPass",
"Pass": "Parent",
"Attachment": "Output"
}
}
@@ -186,40 +123,27 @@
},
{
"Name": "LightCullingPass",
"TemplateName": "LightCullingTemplate",
"TemplateName": "LightCullingParentTemplate",
"Connections": [
{
"LocalSlot": "TileLightData",
"LocalSlot": "SkinnedMeshes",
"AttachmentRef": {
"Pass": "LightCullingTilePreparePass",
"Attachment": "TileLightData"
}
}
]
},
{
"Name": "LightCullingRemapPass",
"TemplateName": "LightCullingRemapTemplate",
"Connections": [
{
"LocalSlot": "TileLightData",
"AttachmentRef": {
"Pass": "LightCullingTilePreparePass",
"Attachment": "TileLightData"
"Pass": "SkinningPass",
"Attachment": "SkinnedMeshOutputStream"
}
},
{
"LocalSlot": "LightCount",
"LocalSlot": "DepthMSAA",
"AttachmentRef": {
"Pass": "LightCullingPass",
"Attachment": "LightCount"
"Pass": "DepthPrePass",
"Attachment": "DepthMSAA"
}
},
{
"LocalSlot": "LightList",
"LocalSlot": "SwapChainOutput",
"AttachmentRef": {
"Pass": "LightCullingPass",
"Attachment": "LightList"
"Pass": "Parent",
"Attachment": "Output"
}
}
]
@@ -259,21 +183,21 @@
{
"LocalSlot": "DepthStencilInputOutput",
"AttachmentRef": {
"Pass": "DepthMSAAPass",
"Attachment": "Output"
"Pass": "DepthPrePass",
"Attachment": "DepthMSAA"
}
},
{
"LocalSlot": "TileLightData",
"AttachmentRef": {
"Pass": "LightCullingRemapPass",
"Pass": "LightCullingPass",
"Attachment": "TileLightData"
}
},
{
"LocalSlot": "LightListRemapped",
"AttachmentRef": {
"Pass": "LightCullingRemapPass",
"Pass": "LightCullingPass",
"Attachment": "LightListRemapped"
}
}
@@ -32,11 +32,12 @@
"Attachment": "SpecularInputOutput"
}
},
"MultisampleSource": {
"Pass": "This",
"Attachment": "SpecularInputOutput"
},
"ImageDescriptor": {
"Format": "R16G16B16A16_FLOAT",
"MultisampleState": {
"samples": 4
},
"SharedQueueMask": "Graphics"
}
}
@@ -248,6 +248,9 @@ namespace AZ
AZ::RPI::RenderPipelineDescriptor environmentCubeMapPipelineDesc;
environmentCubeMapPipelineDesc.m_mainViewTagName = "MainCamera";
environmentCubeMapPipelineDesc.m_renderSettings.m_multisampleState.m_samples = 4;
environmentCubeMapPipelineDesc.m_renderSettings.m_size.m_width = RPI::EnvironmentCubeMapPass::CubeMapFaceSize;
environmentCubeMapPipelineDesc.m_renderSettings.m_size.m_height = RPI::EnvironmentCubeMapPass::CubeMapFaceSize;
// create a unique name for the pipeline
AZ::Uuid uuid = AZ::Uuid::CreateRandom();
@@ -57,7 +57,7 @@ namespace AZ
PassConnection childInputConnection;
childInputConnection.m_localSlot = "Output";
childInputConnection.m_attachmentRef.m_pass = "Parent";
childInputConnection.m_attachmentRef.m_attachment = "CubeMapOutput";
childInputConnection.m_attachmentRef.m_attachment = "Output";
childRequest.m_connections.emplace_back(childInputConnection);
PassSystemInterface* passSystem = PassSystemInterface::Get();
@@ -120,15 +120,17 @@ namespace AZ
// create output PassAttachment
m_passAttachment = aznew PassAttachment();
m_passAttachment->m_name = "CubeMapOutput";
m_passAttachment->m_path = "CubeMapOutput";
m_passAttachment->m_name = "Output";
//m_passAttachment->m_path = "Output";
AZ::Name attachmentPath(AZStd::string::format("%s.%s", GetPathName().GetCStr(), m_passAttachment->m_name.GetCStr()));
m_passAttachment->m_path = attachmentPath;
m_passAttachment->m_lifetime = RHI::AttachmentLifetimeType::Transient;
m_passAttachment->m_descriptor = m_outputImageDesc;
// create pass attachment binding
PassAttachmentBinding outputAttachment;
outputAttachment.m_name = "CubeMapOutput";
outputAttachment.m_slotType = PassSlotType::Output;
outputAttachment.m_name = "Output";
outputAttachment.m_slotType = PassSlotType::InputOutput;
outputAttachment.m_attachment = m_passAttachment;
outputAttachment.m_scopeAttachmentUsage = RHI::ScopeAttachmentUsage::RenderTarget;