| 700 | } |
| 701 | |
| 702 | Tr2GpuResourcePool::Texture EveSpaceSceneRenderDriver::GetOpaqueColorMapIfNeeded( const TextureSize2D& size, const Span<TempOutput>& outputs ) |
| 703 | { |
| 704 | auto namedOutput = FindNamedOutput( outputs, "OpaqueColorMap" ); |
| 705 | bool needsOpaqueBackBuffer = m_upscalingContext != nullptr || m_settings.antiAliasingQuality >= AntiAliasingQuality::Medium || m_settings.forceOpaqueBuffer || namedOutput; |
| 706 | if( !needsOpaqueBackBuffer ) |
| 707 | { |
| 708 | // If there are SSSSS batches, we need an opaque back buffer |
| 709 | auto batches = m_scene->m_primaryBatches[TRIBATCHTYPE_OPAQUE]; |
| 710 | static const auto SSSSS = BlueSharedString( "SSSSS" ); |
| 711 | needsOpaqueBackBuffer = Tr2RenderContext::TechniqueInBatch( batches->GetGdprBatches(), SSSSS ) || Tr2RenderContext::TechniqueInBatch( batches->GetBatches(), SSSSS ); |
| 712 | } |
| 713 | if( needsOpaqueBackBuffer ) |
| 714 | { |
| 715 | auto texture = m_gpuResourcePool.GetTempTexture( "opaqueBackBuffer", size, m_internalPixelFormat, Tr2GpuUsage::RENDER_TARGET | Tr2GpuUsage::SHADER_RESOURCE ); |
| 716 | if( namedOutput ) |
| 717 | { |
| 718 | namedOutput->texture = texture; |
| 719 | } |
| 720 | return texture; |
| 721 | } |
| 722 | return {}; |
| 723 | } |
| 724 | |
| 725 | std::vector<Tr2TextureReferencePtr> EveSpaceSceneRenderDriver::GetAllTempTextures() const |
| 726 | { |
nothing calls this directly
no test coverage detected