Integrating github/staging through commit ab87ed9

This commit is contained in:
alexpete
2021-04-09 11:27:37 -07:00
parent ae62a97894
commit 1044dc3da1
1582 changed files with 29374 additions and 519051 deletions
@@ -774,12 +774,7 @@ void PostAAPass::RenderFinalComposite(CTexture* sourceTexture)
PROFILE_LABEL_SCOPE("NATIVE_UPSCALE");
gRenDev->m_RP.m_FlagsShader_RT &= ~(g_HWSR_MaskBit[HWSR_SAMPLE0] | g_HWSR_MaskBit[HWSR_SAMPLE5]);
#if AZ_RENDER_TO_TEXTURE_GEM_ENABLED
const bool renderSceneToTexture = (gcpRendD3D->m_RP.m_TI[gcpRendD3D->m_RP.m_nProcessThreadID].m_PersFlags & RBPF_RENDER_SCENE_TO_TEXTURE) != 0;
if ((sourceTexture->GetWidth() != gRenDev->GetOverlayWidth() || sourceTexture->GetHeight() != gRenDev->GetOverlayHeight()) && !renderSceneToTexture)
#else
if (sourceTexture->GetWidth() != gRenDev->GetOverlayWidth() || sourceTexture->GetHeight() != gRenDev->GetOverlayHeight())
#endif // if AZ_RENDER_TO_TEXTURE_GEM_ENABLED
{
gRenDev->m_RP.m_FlagsShader_RT |= g_HWSR_MaskBit[HWSR_SAMPLE0];
}
@@ -789,13 +784,6 @@ void PostAAPass::RenderFinalComposite(CTexture* sourceTexture)
gRenDev->m_RP.m_FlagsShader_RT |= g_HWSR_MaskBit[HWSR_SAMPLE5];
}
#if AZ_RENDER_TO_TEXTURE_GEM_ENABLED
if (CRenderer::CV_r_FinalOutputAlpha == static_cast<int>(AzRTT::AlphaMode::ALPHA_DEPTH_BASED))
{
// enable sampling of depth target for alpha value
gRenDev->m_RP.m_FlagsShader_RT |= g_HWSR_MaskBit[HWSR_SAMPLE1];
}
#endif // if AZ_RENDER_TO_TEXTURE_GEM_ENABLED
PostProcessUtils().SetSRGBShaderFlags();
@@ -809,13 +797,6 @@ void PostAAPass::RenderFinalComposite(CTexture* sourceTexture)
texStateLinerSRGB.m_bSRGBLookup = true;
sourceTexture->Apply(0, CTexture::GetTexState(texStateLinerSRGB));
#if AZ_RENDER_TO_TEXTURE_GEM_ENABLED
if (CRenderer::CV_r_FinalOutputAlpha == static_cast<int>(AzRTT::AlphaMode::ALPHA_DEPTH_BASED))
{
CTexture::s_ptexZTarget->Apply(1, CTexture::GetTexState(STexState(FILTER_POINT, true)));
}
#endif // if AZ_RENDER_TO_TEXTURE_GEM_ENABLED
SPostEffectsUtils::DrawFullScreenTri(gcpRendD3D->GetOverlayWidth(), gcpRendD3D->GetOverlayHeight());
SPostEffectsUtils::ShEndPass();