Graphics/FrameGraph: Add support for cubemap and slice rendering
This commit is contained in:
committed by
Jérôme Leclercq
parent
4ae3f51174
commit
5a57976b4b
@@ -16,10 +16,32 @@ namespace Nz
|
||||
return id;
|
||||
}
|
||||
|
||||
inline std::size_t FrameGraph::AddAttachmentCube(FramePassAttachment attachment)
|
||||
{
|
||||
std::size_t id = m_attachments.size();
|
||||
m_attachments.emplace_back(AttachmentCube{ std::move(attachment) });
|
||||
|
||||
return id;
|
||||
}
|
||||
|
||||
inline std::size_t FrameGraph::AddAttachmentCubeFace(std::size_t attachmentId, CubemapFace face)
|
||||
{
|
||||
attachmentId = ResolveAttachmentIndex(attachmentId);
|
||||
|
||||
assert(std::holds_alternative<AttachmentCube>(m_attachments[attachmentId]));
|
||||
|
||||
std::size_t id = m_attachments.size();
|
||||
m_attachments.emplace_back(AttachmentLayer{
|
||||
attachmentId,
|
||||
SafeCast<std::size_t>(face)
|
||||
});
|
||||
|
||||
return id;
|
||||
}
|
||||
|
||||
inline std::size_t FrameGraph::AddAttachmentProxy(std::string name, std::size_t attachmentId)
|
||||
{
|
||||
assert(attachmentId < m_attachments.size());
|
||||
assert(std::holds_alternative<FramePassAttachment>(m_attachments[attachmentId]));
|
||||
|
||||
std::size_t id = m_attachments.size();
|
||||
m_attachments.emplace_back(AttachmentProxy {
|
||||
|
||||
Reference in New Issue
Block a user