Hi all,
The motion blur currently builtin the URP seems to be based on the camera motion.
In my current project, my camera will stay static, therefore cannot benefit from the motion blur.
Here is a screenshot of a successful attempt unfortunately working only in editor scene view:
It seems like creating custom PP effects with URP is still not a thing. (omg why…)
So I want to do it with a custom renderer feature.
My content itself is not animated, but as a whole, moves around. So I’m happy to do a simple blit of the current frame a few times with an offset + blur, as a solution (meaning I don’t need to save the last (few) frame(s)).
My issue seems to be choosing the source and destination of my Blit. I just can’t seem to find the one that works in editor, scene view and game view as well as in a build.
I tried
cmd.Blit(BuiltinRenderTextureType.CameraTarget, BuiltinRenderTextureType.CameraTarget, material);
cmd.Blit(RenderTargetHandle.CameraTarget.Identifier(), RenderTargetHandle.CameraTarget.Identifier(), material);
And a lot of other options, but none seem to be working for me…
I am attaching my file with most of the solutions I tested. Including my offset+blur shader if you have any comment on that.
I have one remaining trail I’m unable to bring to a close, and I believe it could be related.
If I change my event from
RenderPassEvent.AfterRenderingPostProcessing
to
RenderPassEvent.BeforeRenderingPostProcessing
which I would like to do, to benefit from things like anti-aliasing, my custom render pass no longer has any effect whatsoever…
Could it be because the PostProcessingPass implemented by the ForwardRenderer takes as a source the exact texture I need, and therefore my pass gets overridden?
Feel free to give any piece of advice even if you’re not sure, I’m also trying to learn and I’m happy to test your stuff and let you know if it worked for me.
Thanks for your help!
5166347–512585–MotionBlurRendererFeature.cs (4.86 KB)
5166347–512588–PostProcessing_CustomMotionBlur.shader (2.51 KB)
