Closed alex-leleka closed 4 years ago
Hi @alex-leleka , thank for providing this pull request. Looking into it.
Hi @alex-leleka, were you seeing these performance increases when blending depth of field values or others? It'd be great to get your use case, thanks!
Hello @AMZN-alexpete Answered in: https://forums.awsgametech.com/t/posteffect-blend-optimization-pull-request/7850
Thanks for submitting this code @alex-leleka, we've included it in the upcoming 1.26 release!
Issue #, if available: LY-108315 https://forums.awsgametech.com/t/posteffect-blend-optimization-pull-request/7850 Description of changes:
Small hash map (PostEffectGroupManager::m_paramCache) recreated every frame in CRenderer::SyncMainWithRender. We saved 1.0 - 0.2 = 0.8 ms when frame is GPU bound in PC Profile mode. And 0.5 ms for CPU bound frame. This numbers measured for Intel i7-8700 CPU.
Add new dummy type member to AZStd::variant<float, Vec4, AZStd::string> PostEffectGroupParam. Post effects groups are blended before GPU frame flush and synchronized after flush.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.