Gems/LyShine

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
Esteban Papp
2021-08-10 21:07:42 -07:00
parent a6cdb1e58c
commit 500f84d469
4 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -135,7 +135,7 @@ namespace LyShine
passData->m_pipelineViewTag = AZ::Name("MainCamera");
auto size = attachmentImage->GetRHIImage()->GetDescriptor().m_size;
passData->m_overrideScissor = AZ::RHI::Scissor(0, 0, size.m_width, size.m_height);
passData->m_overrideViewport = AZ::RHI::Viewport(0, size.m_width, 0, size.m_height);
passData->m_overrideViewport = AZ::RHI::Viewport(0, static_cast<float>(size.m_width), 0, static_cast<float>(size.m_height));
passTemplate->m_passData = AZStd::move(passData);
// Create a pass descriptor for the new child pass
AZ::RPI::PassDescriptor childDesc;
+2 -2
View File
@@ -881,8 +881,8 @@ namespace LyShine
{
for (int i = 0; i < primitive->m_numVertices; ++i)
{
primitive->m_vertices[i].texIndex = texUnit0;
primitive->m_vertices[i].texIndex2 = texUnit1;
primitive->m_vertices[i].texIndex = aznumeric_cast<uint8>(texUnit0);
primitive->m_vertices[i].texIndex2 = aznumeric_cast<uint8>(texUnit1);
}
}
@@ -463,7 +463,7 @@ void UiFaderComponent::CreateOrResizeRenderTarget(const AZ::Vector2& pixelAligne
// Create a render target that this element and its children will be rendered to
AZ::EntityId canvasEntityId;
EBUS_EVENT_ID_RESULT(canvasEntityId, GetEntityId(), UiElementBus, GetCanvasEntityId);
AZ::RHI::Size imageSize(renderTargetSize.GetX(), renderTargetSize.GetY(), 1);
AZ::RHI::Size imageSize(aznumeric_cast<uint32_t>(renderTargetSize.GetX()), aznumeric_cast<uint32_t>(renderTargetSize.GetY()), 1);
EBUS_EVENT_ID_RESULT(m_attachmentImageId, canvasEntityId, LyShine::RenderToTextureRequestBus, UseRenderTarget, AZ::Name(m_renderTargetName.c_str()), imageSize);
if (m_attachmentImageId.IsEmpty())
{
+2 -2
View File
@@ -564,7 +564,7 @@ void UiMaskComponent::CreateOrResizeRenderTarget(const AZ::Vector2& pixelAligned
// Create a render target that this element and its children will be rendered to
AZ::EntityId canvasEntityId;
EBUS_EVENT_ID_RESULT(canvasEntityId, GetEntityId(), UiElementBus, GetCanvasEntityId);
AZ::RHI::Size imageSize(renderTargetSize.GetX(), renderTargetSize.GetY(), 1);
AZ::RHI::Size imageSize(aznumeric_cast<uint32_t>(renderTargetSize.GetX()), aznumeric_cast<uint32_t>(renderTargetSize.GetY()), 1);
EBUS_EVENT_ID_RESULT(m_contentAttachmentImageId, canvasEntityId, LyShine::RenderToTextureRequestBus, UseRenderTarget, AZ::Name(m_renderTargetName.c_str()), imageSize);
if (m_contentAttachmentImageId.IsEmpty())
{
@@ -762,7 +762,7 @@ void UiMaskComponent::RenderUsingGradientMask(LyShine::IRenderGraph* renderGraph
{
// go through all the cached vertices and update the alpha values
UCol desiredPackedColor = m_cachedPrimitive.m_vertices[0].color;
desiredPackedColor.a = desiredPackedAlpha;
desiredPackedColor.a = aznumeric_cast<uint8>(desiredPackedAlpha);
for (int i = 0; i < m_cachedPrimitive.m_numVertices; ++i)
{
m_cachedPrimitive.m_vertices[i].color = desiredPackedColor;