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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user