Search Unity

TAA super blurry

Discussion in 'High Definition Render Pipeline' started by laurentlavigne, May 17, 2020.

  1. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,330
    When moving the camera, TAA turns everything into a blur, far more than a 90° shutter motion blur.
    Short of cranking up shapener which creates other problems, is there a way to mitigate that, I'm thinking reducing the number of frames that's accumulated for AA.
     
  2. reddotgames

    reddotgames

    Joined:
    Apr 5, 2011
    Posts:
    707
    Same here, TAA in current state (and without any params except sharpnes) is unusable. We have massive ghosting / blurring when walk from TAA and it cannot be delivered to final product like that. We are just hopeing Unity will make it look better.
     
    Crossway and ConAim like this.
  3. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
    They have made it better but I don't think it's landed on current releases yet, I've used it from github directly myself.

    Here are doc changes for the new TAA settings:
    https://github.com/Unity-Technologies/Graphics/pull/132/files

    Some of these exposed settings are new feats to TAA and TAA algo itself has been improved as well, it shouldn't ghost as badly anymore (and you can now use speed rejection for the part that does).

    I would have linked the original PR for the TAA update as it explained these in more detail but it's in the old SRP repo that's not public anymore.

    Do note that TAA will soften the image by design always, this is what the sharpen options are for. It's not just Unity's TAA implementation but happens on all of them.

    Same with the ghosting issues on some materials, you can workaround some ghosting but there isn't any TAA algo out there that wouldn't ghost under some circumstances (which is why the speed rejection option is nice as you can at least hide it).
     
    laurentlavigne and sqallpl like this.
  4. reddotgames

    reddotgames

    Joined:
    Apr 5, 2011
    Posts:
    707
    Thanks rz_0lento will check that out right away!
    Will it work on Unity 2019.3?
     
    Last edited: May 19, 2020
  5. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
    I don't think they'll backport it to 7.x or even to 8.x HDRP.

    It's currently only on 9.x.x release branch, master and hdrp/staging (so HDRP 9 and 10). Afaik, there's nothing on this change that wouldn't work (besides the multi compile pragmas) on 7.x though. Technically you could just merge the TAA changes yourself to 7.3.1 altho it's bit tricky to find the relevant changes now that the old PR isn't visible anymore.
     
  6. SebLagarde

    SebLagarde

    Unity Technologies

    Joined:
    Dec 30, 2015
    Posts:
    934
    rz_Olento get it all correct, I have nothing to add. (And yes, I confirm we will not backport it, neither for 7.x nor for 8.x) but it will work on those.
     
  7. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
    I quickly cherry-picked the related commits to 7.3.1 here:
    https://github.com/0lento/Graphics/tree/taa-update-7.3.1
    and 7.41 here: https://github.com/0lento/Graphics/tree/taa-update-7.4.1

    Do note that you need to clone this repo using git LFS for it to work. After cloning you only need to use the HDRP package from this repo, for the rest you can use stock packages provided by Package Manager.

    It's largely untested, just checked it did start up without any errors but there could still be some unnoticed mistakes on the merge etc. Putting it here mainly if people want to test if it improves things for them.
     
    Last edited: Jun 16, 2020
    keeponshading and laurentlavigne like this.
  8. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,330
    @rz_0lento you're on fire!
    Thanks for the work and looking at your repo you seem to be using it a lot, prod? What's your take on it?
    (@SebLagarde don't look)
     
  9. reddotgames

    reddotgames

    Joined:
    Apr 5, 2011
    Posts:
    707
    Thank you @rz_0lento for that awesome work! Will check that out for sure.
     
  10. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
    It's definitely an improvement. I've done some work on hacking the old HDRP TAA so I know the pain points and things that break on my use cases. I've basically implemented hacks mentioned on this post for it: https://aws.amazon.com/blogs/gametech/anti-ghosting-with-temporal-anti-aliasing/.

    The new one doesn't necessarily require all these hacks anymore, especially the speed rejection is similar to what's on Amazon's blog post (not same implementation but similar end result). There's still some gains to be had with the stencil hacks but it's also now more tricky that HDRP TAA is now on pixel shaders (I did my changes to the compute shader version where accessing buffers was tad simpler IMO).
     
    laurentlavigne likes this.
  11. jjejj87

    jjejj87

    Joined:
    Feb 2, 2013
    Posts:
    1,117
    Seb, could you kindly port it for 7.x as a lot of us are stuck in that version. (Can't go any above as Realtime GI is no longer supported on 2020.1 and above)
     
  12. reddotgames

    reddotgames

    Joined:
    Apr 5, 2011
    Posts:
    707
    Tested 0lentos package and it works good - TA is little better with few bonus parameters.
    But soon there will be new HDRP package and it will not work anymore if we need to update, so yes, Unity should port it to 7.x because it is working ok here.
     
  13. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
    I don't know for sure but I'd guess the reason why they have not backported this is because it's more of a feature/upgrade than crucial bug fix. New features/reworked features can potentially change/break existing projects so I can fully understand if they are reluctant on pushing them to version supported by LTS.

    In general, Unity seems to push bigger updates and new feats only for bleeding edge HDRP so they get more time to get tested and stabilized before feats make into stable Unity release.

    In this case though, one could just merge --squash my branch to future HDRP 7.4.0. It takes like few git operations total if you know how to use git. While Unity will not merge all feats, it doesn't mean we users couldn't cherry-pick the changes ourselves where possible.
     
    chap-unity likes this.
  14. reddotgames

    reddotgames

    Joined:
    Apr 5, 2011
    Posts:
    707
    Since there is HDRP 7.4.1, can you @rz_0lento make 7.4.1 package with taa changes? :) Thank you!
     
  15. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
    reddotgames likes this.
  16. reddotgames

    reddotgames

    Joined:
    Apr 5, 2011
    Posts:
    707
  17. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361