alelievr / HDRP-Custom-Passes

A bunch of custom passes made for HDRP
MIT License
1.31k stars 138 forks source link

FPS Foreground Motion Vector and TAA #44

Closed ArieLeo closed 11 months ago

ArieLeo commented 2 years ago

The latest commit seems fixed the issue of Fps Foreground with transparency and post processing. But TAA and motion vector seems doesn't work Any clue/pointer on how to add support for TAA and motion vector to this?

alelievr commented 1 year ago

Yes, we can fix motion vectors by adding another pass that writes motion vectors of the FPS objects. But this is still not a perfect solution since you'll still have issues with shadows during lighting, subsurface scattering, and probably a few others.

alelievr commented 11 months ago

Hey, I added support for Motion vectors in the FPS custom pass (it removed motion from the FPS objects).

There is one issue though: it also removes a bit of motion on the border of the FPS objects because the motion blur can't reproject values that were cleared: image

Also, it doesn't handle well SSAO currently, I can't nuke the depth buffer values like I was planning to do because it breaks the tile light list generation (and so the lighting of the object). That leads to the SSAO being applied to foreground objects when they are close to a surface: image

You can tweak the effect to reduce the visual impact of these issues though so it's not unusable. I can see a more complete solution being made inside HDRP and handled well by all the internal passes, but it's not the priority right now :/