Changed FullScreenTrianglePass::FrameBegin to use FramePrepareParams viewport and scissor states if they are set.
Changed ReflectionScreenSpaceBlurChildPass to set the viewport and scissor states.
This commit is contained in:
+3
@@ -47,6 +47,9 @@ namespace AZ
|
||||
m_updateSrg = true;
|
||||
}
|
||||
|
||||
params.m_viewportState = RHI::Viewport(0, static_cast<float>(m_imageSize.m_width), 0, static_cast<float>(m_imageSize.m_height));
|
||||
params.m_scissorState = RHI::Scissor(0, 0, m_imageSize.m_width, m_imageSize.m_height);
|
||||
|
||||
FullscreenTrianglePass::FrameBeginInternal(params);
|
||||
}
|
||||
|
||||
|
||||
@@ -181,9 +181,19 @@ namespace AZ
|
||||
|
||||
RHI::Size targetImageSize = outputAttachment->m_descriptor.m_image.m_size;
|
||||
|
||||
// Base viewport and scissor off of target attachment
|
||||
m_viewportState = RHI::Viewport(0, static_cast<float>(targetImageSize.m_width), 0, static_cast<float>(targetImageSize.m_height));
|
||||
m_scissorState = RHI::Scissor(0, 0, targetImageSize.m_width, targetImageSize.m_height);
|
||||
m_viewportState = params.m_viewportState;
|
||||
if (m_viewportState.IsNull())
|
||||
{
|
||||
// compute viewport from target attachment
|
||||
m_viewportState = RHI::Viewport(0, static_cast<float>(targetImageSize.m_width), 0, static_cast<float>(targetImageSize.m_height));
|
||||
}
|
||||
|
||||
m_scissorState = params.m_scissorState;
|
||||
if (m_scissorState.IsNull())
|
||||
{
|
||||
// compute scissor from target attachment
|
||||
m_scissorState = RHI::Scissor(0, 0, targetImageSize.m_width, targetImageSize.m_height);
|
||||
}
|
||||
|
||||
RenderPass::FrameBeginInternal(params);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user