| 21 | { |
| 22 | |
| 23 | void BeginRenderPass( Tr2RenderContext& renderContext, const std::initializer_list<Tr2TextureAL>& colorAttachments, const Tr2TextureAL& depthAttachment ) |
| 24 | { |
| 25 | uint32_t index = 0; |
| 26 | for( auto& colorAttachment : colorAttachments ) |
| 27 | { |
| 28 | renderContext.m_esm.SetRenderTarget( index++, colorAttachment ); |
| 29 | } |
| 30 | // clear out remaining slots, generously assuming max 4 render targets |
| 31 | const uint32_t maxRenderTargets = 4; |
| 32 | for( ; index < maxRenderTargets; ++index ) |
| 33 | { |
| 34 | renderContext.m_esm.SetRenderTarget( index++, Tr2TextureAL{} ); |
| 35 | } |
| 36 | renderContext.m_esm.SetDepthStencilBuffer( depthAttachment ); |
| 37 | renderContext.m_esm.SetFullScreenViewport(); |
| 38 | } |
| 39 | |
| 40 | Tr2GpuResourcePool::Texture GetEmptySSAO( Tr2GpuResourcePool& gpuResourcePool ) |
| 41 | { |
no test coverage detected