Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  3. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Bug HDRP12 – DLSS breaks custom post processing volumes

Discussion in '2021.2 Beta' started by larsbertram1, Jul 21, 2021.

  1. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,899
    when using custom post processing volumes together with DLSS the final image on screen will be cropped - unless you set "mode" to "ultra performance" :(
    bug filed as:
    Case 1352407
     
  2. Onat-H

    Onat-H

    Joined:
    Mar 11, 2015
    Posts:
    195
    This actually seems to be related to physical DOF, all other post processing effects seem to work in my case
     
  3. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,899
    unfortunately making sure DOF is disabled does not fix the issue.
    the really strange thing here is the fact that all passes prior to any post processing like dbuffer, gbuffer etc already are cropped.
     
    Bartolomeus755 likes this.
  4. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,132
  5. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
  6. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,899
    i haven't. so thanks for pointing me towards this.
    not sure if this will fix it. because when i look into the frame in renderdoc all previous passes are already cropped!
    so 2/3 of th egbuffer e.g. is just empty...
     
  7. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,899
    just gave it a try as you may never know but it does not fix it at all.
    the problem actually is not the custom postprocessing shader using wrong uvs, it is the entire camera using a cropped frustum or rect.

    below you can see the gebuffer output in renderdoc.
    stuff with the blue hatch on top are uncleared artifacts in the gbuffer.
    so actually only the lower left part is rendered. note the yellow outline of the ground plane highlighted by render doc.

    and this happens way before the custom post processing volume comes into play...

    so it looks as if hdrp sets up the rect properly (downsized as dlss is active) but does not downscale the gbuffer?

    clippedRendering.PNG
     
  8. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,132
  9. olavrv

    olavrv

    Joined:
    May 26, 2015
    Posts:
    515
    I saw there was some fixes implemented in HDRP - but I am still not able to make it work...

    Anyone have any updated info on how to solve this?
     
  10. TanselAltinel

    TanselAltinel

    Joined:
    Jan 7, 2015
    Posts:
    190
    I wonder if I'll ever see this resolved at all :)
     
  11. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
    I think this PR is meant to fix it but I haven't tested the change myself: https://github.com/Unity-Technologies/Graphics/pull/7222. It's just one line change so it's trivial to test yourself with customized HDRP package too.

    This is one example how you can test it:
    . move com.unity.render-pipelines.high-definition package out of <project folder>Library/PackageCache and put it into your Packages folder
    - then do this one line change from https://github.com/Unity-Technologies/Graphics/pull/7222/files

    if you go this route, Unity can't automatically update HDRP package on Unity updates so you have to wipe the local package and redo the process after upgrading the project once. But this would let you try the fix today.
     
    TanselAltinel likes this.
  12. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
  13. olavrv

    olavrv

    Joined:
    May 26, 2015
    Posts:
    515
    I tested fix on git, it works!
     
    rz_0lento likes this.
  14. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,899
    yeah, it is fixed.
     
  15. TanselAltinel

    TanselAltinel

    Joined:
    Jan 7, 2015
    Posts:
    190
    Thank you very much for pointing this out for me, but in my version of Unity 2021.3.1 and HDRP 12.1.6 there's no CustomPassSampling.hlsl file at all. If this is a higher version for, i.e. 2022, then I cannot switch to it due to too many other files depending on current version of Unity.

    I wonder if this will be incorporated into HDRP 12.1 at all. I can't upgrade my Unity version just for having a custom fix.
     
  16. TanselAltinel

    TanselAltinel

    Joined:
    Jan 7, 2015
    Posts:
    190
    Which version of HDRP are you using?
     
  17. olavrv

    olavrv

    Joined:
    May 26, 2015
    Posts:
    515
    latest on staging 2021.3 branch on git, then lines in code from fix (search 1398904 on git and you will find the fix)
     
    TanselAltinel likes this.
  18. DGordon

    DGordon

    Joined:
    Dec 8, 2013
    Posts:
    648
    Is this fixed? Im getting issues using this with post processing on hdrp 2022.2.15 ... it does different bad things depending on what post I have enabled. I'm trying to use this to render out a movie ...

    [Edit -- it seems to be working in the game window during edit mode (not positive but when I click it on it seems to get rid of jaggies)? Its only once I click play then post processing does strange things.]
     
    Last edited: May 1, 2023