Gems/LyShine
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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())
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user