| 651 | } |
| 652 | |
| 653 | Tr2GpuResourcePool::Texture EveSpaceSceneRenderDriver::GetVelocityMapIfNeeded( const TextureSize2D& size, const Span<TempOutput>& outputs ) |
| 654 | { |
| 655 | USE_MAIN_THREAD_RENDER_CONTEXT(); |
| 656 | auto upscalingInfo = renderContext.GetUpscalingInfo( m_upscalingContext ? m_upscalingContext->GetID() : Tr2UpscalingAL::INVALID_CONTEXT_ID ); |
| 657 | bool needsVelocityMap = m_settings.antiAliasingQuality != AntiAliasingQuality::Disabled || ( upscalingInfo.technique != Tr2UpscalingAL::NONE && upscalingInfo.temporal ); |
| 658 | auto namedOutput = FindNamedOutput( outputs, "VelocityMap" ); |
| 659 | Tr2GpuResourcePool::Texture velocityMap; |
| 660 | if( needsVelocityMap || m_settings.forceVelocityMap || namedOutput ) |
| 661 | { |
| 662 | auto texture = m_gpuResourcePool.GetTempTexture( "velocityMap", size, ImageIO::PIXEL_FORMAT_R16G16_FLOAT, Tr2GpuUsage::RENDER_TARGET | Tr2GpuUsage::SHADER_RESOURCE ); |
| 663 | if( namedOutput ) |
| 664 | { |
| 665 | namedOutput->texture = texture; |
| 666 | } |
| 667 | return texture; |
| 668 | } |
| 669 | return {}; |
| 670 | } |
| 671 | |
| 672 | Tr2GpuResourcePool::Texture EveSpaceSceneRenderDriver::GetNormalMapIfNeeded( const TextureSize2D& size, const Span<TempOutput>& outputs ) |
| 673 | { |
nothing calls this directly
no test coverage detected