Reenable LyShine mask support now using Atom (#1218)

* Add option to set stencil ref in Dynamic Draw Context

* Add depth/stencil attachment slot to UI pass

* Rework mask rendering to use Atom

* Add missing circle mask image
This commit is contained in:
michabr
2021-06-11 10:03:06 -07:00
committed by GitHub
parent 0c7605c9b6
commit 6584e1290b
12 changed files with 196 additions and 94 deletions
@@ -382,6 +382,16 @@ namespace AZ
m_useViewport = false;
}
void DynamicDrawContext::SetStencilReference(uint8_t stencilRef)
{
m_stencilRef = stencilRef;
}
uint8_t DynamicDrawContext::GetStencilReference() const
{
return m_stencilRef;
}
void DynamicDrawContext::SetShaderVariant(ShaderVariantId shaderVariantId)
{
AZ_Assert( m_initialized && m_supportShaderVariants, "DynamicDrawContext is not initialized or unable to support shader variants. "
@@ -475,6 +485,9 @@ namespace AZ
drawItem.m_viewports = &m_viewport;
}
// Set stencil reference. Used when stencil is enabled.
drawItem.m_stencilRef = m_stencilRef;
drawItemInfo.m_sortKey = m_sortKey++;
m_cachedDrawItems.emplace_back(drawItemInfo);
}