Merge branch 'fix-issue-158' of git://github.com/VNNCC/FlaxEngine into VNNCC-fix-issue-158

This commit is contained in:
Wojtek Figat
2021-02-01 23:39:56 +01:00

View File

@@ -339,6 +339,13 @@ void MotionBlurPass::Render(RenderContext& renderContext, GPUTexture*& input, GP
// 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;
auto vMaxBuffer = RenderTargetPool::Get(rtDesc);
context->ResetRenderTarget();
context->SetRenderTarget(vMaxBuffer->View());