Simplify code

This commit is contained in:
Wojtek Figat
2021-02-01 23:41:23 +01:00
parent 7ddcf8507a
commit 2fe6129fcd

View File

@@ -337,15 +337,8 @@ void MotionBlurPass::Render(RenderContext& renderContext, GPUTexture*& input, GP
RenderTargetPool::Release(vMaxBuffer4);
// Downscale motion vectors texture down to tileSize/tileSize (with max velocity calculation NxN kernel)
rtDesc.Width = motionVectorsWidth / tileSize;
rtDesc.Height = motionVectorsHeight / tileSize;
if (rtDesc.Width < 1)
rtDesc.Width = 1;
if (rtDesc.Height < 1)
rtDesc.Height = 1;
rtDesc.Width = Math::Max(motionVectorsWidth / tileSize, 1);
rtDesc.Height = Math::Max(motionVectorsHeight / tileSize, 1);
auto vMaxBuffer = RenderTargetPool::Get(rtDesc);
context->ResetRenderTarget();
context->SetRenderTarget(vMaxBuffer->View());