Search Unity

Question Problems with HDRP, MSAA and transparency

Discussion in 'High Definition Render Pipeline' started by Qleenie, Aug 18, 2020.

  1. Qleenie

    Qleenie

    Joined:
    Jan 27, 2019
    Posts:
    868
    Hi,

    I have some trouble in getting good looking hair in HDRP; The issue is as soon as I turn MSAA on, I get weird shadow artifacts all over on transparent materials (independent of shader used), seems the depth is not displayed correctly; also, both Alpha Prepass Threshold and Postpass don't work anymore. If I switch off MSAA, prepass works correctly (postpass still does not do anything). Not sure what I am doing wrong, and I have not found an alternative yet to MSAA which works acceptable in VR. Any help would be much appreciated!

    MSAA-on.png MSAA-off.png
     
  2. SebLagarde

    SebLagarde

    Unity Technologies

    Joined:
    Dec 30, 2015
    Posts:
    934
    Hi, which version of Unity binary and HDRP are you using? Thanks
     
  3. Qleenie

    Qleenie

    Joined:
    Jan 27, 2019
    Posts:
    868
    Hi, I am on 2019.4.9f1 LTS and HDRP 7.4.3.
    Thanks for looking into this,
     
  4. Qleenie

    Qleenie

    Joined:
    Jan 27, 2019
    Posts:
    868
    @SebLagarde Any insights on this ? After more experimenting, it seems that "just" alpha prepass is not working with MSAA enabled; If I switch it off, all good. Seems like a bug to me?
     
  5. SebLagarde

    SebLagarde

    Unity Technologies

    Joined:
    Dec 30, 2015
    Posts:
    934
    Hi, hmm... could be a bug, but I lack information. Would you be able to share the project, or just the hair mesh so we can reproduce it. thanks
     
  6. Qleenie

    Qleenie

    Joined:
    Jan 27, 2019
    Posts:
    868
    It's happening with every (hair) mesh, and with every shader which supports alpha prepass (lit.shader or Hair shader master node). I cannot share the assets, as they are licensed ones.
    But should be simple to reproduce: basically, when MSAA switched on, the alpha prepass slider does nothing.
     
  7. SebLagarde

    SebLagarde

    Unity Technologies

    Joined:
    Dec 30, 2015
    Posts:
    934
    Alright. I will ask our QA to reproduce the issue.
     
  8. Tomas-Kiniulis

    Tomas-Kiniulis

    Unity Technologies

    Joined:
    Apr 27, 2017
    Posts:
    55
    Hey @Qleenie, both Alpha Prepass Threshold and Postpass should work correctly testing on HDRP version 10.3.1 with MSAA enabled. However, I was unable to reproduce the shadow artifacts you show in your picture. Do you still encounter this in latest 2020.2?
     
  9. Qleenie

    Qleenie

    Joined:
    Jan 27, 2019
    Posts:
    868
    Hey, I am on 2019 LTS + HDRP 7.5.3, and also switched to deferred rendering because of issues and performance. Will switch to 2020 only when 2020 LTS will be available, as migration will be a bit of effort with changes to VR / SteamVR.