Motion Blur like Doom4

github.com/1vanK/Urho3DMotionBlur

Use START_DEMO.bat for launch

Looks really neat and smooth.
So it uses camera transform and only affected by camera motion? Or it uses full velocity vectors pass, and can blur many separated objects?

[quote=“Bananaft”]Looks really neat and smooth.
So it uses camera transform and only affected by camera motion? Or it uses full velocity vectors pass, and can blur many separated objects?[/quote]

only camera motion

nice.

Its pretty cool. I am getting bugs on my OSX. The motion blur is jittering and there is motion blur only in some areas of the screen.

try to turn on vsync (options -v)

Also whether you are using the latest version of the engine?

Wow! looks nice, does it work on GLES iOS/Android?

I have not tested

Very nice ! ( with -v that work fine here ) , great job ! what the next ? dof ? :smiley:

This shader is not finished yet (it uses an additional forward light pass for weapon and I can not solve a couple of issues). I have reworked version with mask for weapon, but additional texture affects performance

dof already implemented by monkeyfirst github.com/MonkeyFirst/urho3d-post-process-dof (but as far as I remember, there is need to improve)

Please test updated version. Whether there is a problems WITHOUT vsync? New version render scene to texture and blurs it there, but not just in the viewport

EDIT: for launch still use START_DEMO.bat

work fine without vsync.

ok, but now it is impossible to turn off effect by tag, need use another renderpath without motion blur …

EDIT: although I have an idea

It works properly with vsync it looks pretty cool.

Have you problems with other shaders (Blur, Bloom) when VSync is disabled?

EDIT: a have a hypothesis that engine on some frames start showing viewport before bluring when vsync is disabled and fps is high
EDIT2: someone can test problem by using WithoutMask.bat in repo (u can change window size to 200x700 for increasing fps)

For some reason I had to use -ap flag for the Urho3DPlayer to locate the CoreData folder and then merge the Final folder into that one and the Data folder for it to find all the resources. Then I saw a baked room (Andrew Price’s right?) and a textured pistol, but no blur.
I’m on Xubuntu Linux 64-bit using the proprietary Nvidia drivers. Which - apart from the occasional heavy frame drops - tends to outperform the open Xorg drivers. Switching back to Xorg is a pain though, otherwise I’d be happy to test with those.
I’ve tried the -v option; no help.

[quote=“Modanung”]For some reason I had to use -ap flag for the Urho3DPlayer to locate the CoreData folder and then merge the Final folder into that one and the Data folder for it to find all the resources. Then I saw a baked room (Andrew Price’s right?) and a textured pistol, but no blur.
I’m on Xubuntu Linux 64-bit using the proprietary Nvidia drivers. Which - apart from the occasional heavy frame drops - tends to outperform the open Xorg drivers. Switching back to Xorg is a pain though, otherwise I’d be happy to test with those.
I’ve tried the -v option; no help.[/quote]

Any warnings or errors in log?

None

I have no ideas. Try output in shader intermediate steps.

Weapon maskt:

[code]void PS()
{
float weaponmask = texture2DProj(sDiffMap, vScreenPos).a;

gl_FragColor = vec4(weaponmask);

}
[/code]

Depth:

[code]void PS()
{
float depth = ReconstructDepth(texture2DProj(sDepthBuffer, vScreenPos).r);

gl_FragColor = vec4(depth * 20);

}
[/code]