Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

[RELEASED] NVIDIA DLSS - Upscaling for Unity [Built-in and URP]

Discussion in 'Assets and Asset Store' started by Alterego-Games, Aug 8, 2023.

  1. Alterego-Games

    Alterego-Games

    Joined:
    Jul 13, 2015
    Posts:
    320
    cover_dlss.png
    Boost your frames with DLSS Upscaling for Unity!

    Assetstore URL: https://assetstore.unity.com/packages/tools/utilities/dlss-upscaling-for-unity-262761

    DLSS is an upscaling technique, creating high quality rendering based on lower resolution input. By using this, your project can run in a drastically lower resolution without losing visual quality and increasing the framerate!

    If your project is limited by GPU performance, DLSS will give you a higher framerate. If a project is limited by CPU performance, all it will do is make the GPU workload lower. While this may seem like a big limitation, it also means a laptop will use way less battery power when using DLSS!

    Easy to use
    Simply drag our DLSS component on your camera and you're all set to go!
    Both Built-in and URP are a simple drag and drop and will work with Unity's Post-Processing Stack!

    AAA Anti-Aliasing
    DLSS features a high quality Spatial Anti-Aliasing built-in. Get rid of those jagged edges and flicking while also improving your project's performance!

    Current supported Unity Render Pipelines

    Built-in (BIRP) and Universal Render Pipeline (URP).

    Current supported platforms
    • Windows x64 (DX11, DX12 and Vulkan)*
    *Nvidia GPU's only!
     
    Last edited: Sep 29, 2023
  2. Bwacky

    Bwacky

    Joined:
    Nov 2, 2016
    Posts:
    183
    Can we run this alongside your FSR? :D
     
    Alterego-Games likes this.
  3. Alterego-Games

    Alterego-Games

    Joined:
    Jul 13, 2015
    Posts:
    320
    Hahaha, I wouldn’t recommend it;) But since DLSS is generally seen as the better quality option for upscaling, you can use DLSS as primary upscaler and fall back to FSR 2 when DLSS is unsupported on a platform (or no nvidia gpu).
     
    DragonCoder, BetaMark and Bwacky like this.
  4. Bwacky

    Bwacky

    Joined:
    Nov 2, 2016
    Posts:
    183
    I asked the question dumbly, simply meant if we can slap the component onto the main camera similar to FSR and just toggle between them. I'll take that as a definitive yes though!
     
    Alterego-Games and VirtusH like this.
  5. VirtusH

    VirtusH

    Joined:
    Aug 18, 2015
    Posts:
    93
    Epic!

    Can you elaborate on how it intersects with the post-process stack? Are there any tradeoffs or limitations we should be aware of?
     
  6. Alterego-Games

    Alterego-Games

    Joined:
    Jul 13, 2015
    Posts:
    320
    Injecting DLSS (and FSR 2), in the Post-Processing Stack (for BIRP), allows me to inject the upscaling in the correct moment during rendering. In-between certain types of PP. (See image, for FSR 2, same goes for DLSS).




    Since I have injected FSR 2 into the PP, a lot of the issues the FSR 2 asset previously reported by users, that had to do with 3rd party assets has gone away.

    And it looks like this (FSR 2 example, DLSS is the same):
    upload_2023-8-9_9-10-25.png
     
    Lars-Steenhoff and VirtusH like this.
  7. Necka_

    Necka_

    Joined:
    Jan 22, 2018
    Posts:
    488
    Just to make sure, this is DLSS 2 right? because it's written nowhere even though I guess that's the default choice nowadays.

    Will you potentially add support for DLFG (Frame Generation, more commonly called DLSS 3, even though DLSS 2 is now at version 3.1.30 I think)
    Will we be able to chose the DLSS 2 version to implement?
     
    Alterego-Games likes this.
  8. Alterego-Games

    Alterego-Games

    Joined:
    Jul 13, 2015
    Posts:
    320
    The DLSS version is integrated into the Unity installations, potentially upgradable by swapping the DLSS dll file. This is something I’m still researching.

    But yes, I think most (if not all) supported Unity versions have DLSS 2. This asset currently only supports the upscaler, not the Frame Generation. This is also something I’m still researching!
     
    Necka_ likes this.
  9. VirtusH

    VirtusH

    Joined:
    Aug 18, 2015
    Posts:
    93
    It is upgradeable by swapping the dll in the editor installation. Did this with the other plugin and it worked beautifully (in-editor), the Unity Editor version isn't the latest or greatest. I'm assuming the game will build with the upgraded DLL though, which we didn't test.
     
    Alterego-Games likes this.
  10. Alterego-Games

    Alterego-Games

    Joined:
    Jul 13, 2015
    Posts:
    320
    I will make sure if this is the case and add the possibility to my documentation:)
     
  11. blaher

    blaher

    Joined:
    Oct 21, 2013
    Posts:
    76
    any update on review/release? Kudos for making this... much needed
     
    Alterego-Games likes this.
  12. Alterego-Games

    Alterego-Games

    Joined:
    Jul 13, 2015
    Posts:
    320
    Unfortunately still in review. New assets will be in review for at least 3 or 4 months nowadays it seems...
     
    VirtusH and Bwacky like this.
  13. Bwacky

    Bwacky

    Joined:
    Nov 2, 2016
    Posts:
    183
    Maybe throw it on artstation or github and give paid access? I'd happily wire some $$ directly and I'm sure I'm not the only one here :D
     
    VirtusH likes this.
  14. Alterego-Games

    Alterego-Games

    Joined:
    Jul 13, 2015
    Posts:
    320
    If the review times stay like this, then I'll be sure to think of a better way to bring my assets to gamedevs!
     
    DragonCoder and Bwacky like this.
  15. dillonu_unity

    dillonu_unity

    Joined:
    Jan 28, 2020
    Posts:
    1
    Second this. Not the only one.
     
    Bwacky and Alterego-Games like this.
  16. cracker_user

    cracker_user

    Joined:
    Mar 28, 2019
    Posts:
    1
    Will the 10XX series also work?
     
  17. Alterego-Games

    Alterego-Games

    Joined:
    Jul 13, 2015
    Posts:
    320
    Only RTX cards support DLSS unfortunately.
     
  18. Alterego-Games

    Alterego-Games

    Joined:
    Jul 13, 2015
    Posts:
    320
    I'm very sorry for the hold-up people. It's been about a month since I requested the asset store review, and I'm still only half-way the review queue.
     
  19. Kinggrass

    Kinggrass

    Joined:
    Jun 7, 2016
    Posts:
    69
    Any way to get hands on before the long lasting process is through?
    We are already in project development towards the end and have a huge GPU Bottleneck because of multiple cameras.
    We are eagerly waiting for the release of your asset.
     
    Alterego-Games likes this.
  20. Alterego-Games

    Alterego-Games

    Joined:
    Jul 13, 2015
    Posts:
    320
    Hey, what renderpipeline are you using? Have you considered using our FSR 2 asset?

    https://assetstore.unity.com/packages/tools/utilities/fsr-2-upscaling-for-unity-252172
     
  21. Kinggrass

    Kinggrass

    Joined:
    Jun 7, 2016
    Posts:
    69
    Thanks for your fast reply.
    We are using URP, therefor DLSS is not available there or at leat not integrated well.
    I know that it is part of the SRP foundation and currently only integrated for the HDRP.

    We already considered FSR2, because our company is heavly relying on Nvidia GPUs we tought it would be a nice fit.
    Maybe we will take this until you DLSS solution is out.
    Nevertheless thank you for your work on this front.
     
    Alterego-Games likes this.
  22. Alterego-Games

    Alterego-Games

    Joined:
    Jul 13, 2015
    Posts:
    320
    I'm hoping to be able to release the DLSS within two weeks!
     
    Coreengage and Kinggrass like this.
  23. Alterego-Games

    Alterego-Games

    Joined:
    Jul 13, 2015
    Posts:
    320
  24. TheGamery

    TheGamery

    Joined:
    Oct 14, 2013
    Posts:
    92
    Am I right in thinking Unity comes with DLSS 1 and this asset is DLSS 2?
     
    Alterego-Games likes this.
  25. Alterego-Games

    Alterego-Games

    Joined:
    Jul 13, 2015
    Posts:
    320
    I can’t be absolutely sure what version Unity comes with, but with this asset, you can use any DLSS version you want by swapping the DLSS .dll file. Described in the documentation!
     
  26. Manul_

    Manul_

    Joined:
    Jul 28, 2015
    Posts:
    20
    Hey,
    after adding your dlss package and swaping the unity post processing package, the Post-process Layer (on the camera) shows: "Missing NVIDIA DLSS Package".

    After pressing "Install Package" there, this error still persists and additionally these errors appear in the console:

    Assets\Alterego Games\AEG DLSS\Runtime\BIRP\DLSS_BIRP.cs(41,9): error CS0246: The type or namespace name 'DlssViewData' could not be found
    Assets\Alterego Games\AEG DLSS\Runtime\BIRP\DLSS_BIRP.cs(42,9): error CS0246: The type or namespace name 'ViewState' could not be found (are you missing a using directive or an assembly reference?)

    (I use BIRP)

    Thanks
    Manuel
     
    Dexi and Alterego-Games like this.
  27. Bwacky

    Bwacky

    Joined:
    Nov 2, 2016
    Posts:
    183
    That was a quick release, can't wait to implement it. Thanks guys!
     
    Alterego-Games likes this.
  28. Alterego-Games

    Alterego-Games

    Joined:
    Jul 13, 2015
    Posts:
    320
    Could you check the scriptable defines in the player settings, screenshot them and post them here?
     
  29. Manul_

    Manul_

    Joined:
    Jul 28, 2015
    Posts:
    20
    The packages were added to an empty BIRP project, without anything else (2022.3.10).
     

    Attached Files:

    Alterego-Games likes this.
  30. Alterego-Games

    Alterego-Games

    Joined:
    Jul 13, 2015
    Posts:
    320
    Luckily that looks exactly as it should. Unluckily I only have a mac currently (which doesn't support DLSS), so I'll have to check it out this monday. I'll keep you posted as soon as I know anything.

    In the meanwhile, you could try right-mouse-button -> Reimport on the packages folder, that may fix the issue. I know 2022 has some package manager issues.
     
  31. Manul_

    Manul_

    Joined:
    Jul 28, 2015
    Posts:
    20
    Ok, think I fixed it by adding "ENABLE_NVIDIA_MODULE" to the script defines. Somehow "com.alteregogames.aeg-dlss.Runtime.BIRP.asmdef" did not add it, even if it should. (Even a "Reimport All" didn't change anything)
     
    Alterego-Games likes this.
  32. Alterego-Games

    Alterego-Games

    Joined:
    Jul 13, 2015
    Posts:
    320
    Glad you figured it out, this is a bug, and I am very grateful you found it. I will be fixing it asap!
     
  33. Bwacky

    Bwacky

    Joined:
    Nov 2, 2016
    Posts:
    183
    Small request, can we get a similar modification to the toggle dropdown like it is in FSR? Specifically the option to set DLSS to OFF in the performance selection drop-down in URP would be incredibly helpful.
    I use a method where I select a case and write down what option to toggle on/off for FSR, want to make a case where if FSR is on, DLSS quality gets set OFF but since there's no toggle and I am not sure how to begin adding that, was hoping you could help :oops:
     
  34. Bwacky

    Bwacky

    Joined:
    Nov 2, 2016
    Posts:
    183
    Should mention that it does appear in the code everywhere I check but not on the camera component for some reason.
     
  35. unity_1D961E3382DEE3FB3654

    unity_1D961E3382DEE3FB3654

    Joined:
    Jul 13, 2023
    Posts:
    1
    I needed the same so I created my own enum which I use instead...
    upload_2023-9-30_14-49-15.png
     
  36. bakanekofr

    bakanekofr

    Joined:
    Feb 28, 2014
    Posts:
    121
    Hi, I have a problem with my setup, which uses a RenderTexture on the camera, here's the log:

    Dimensions of color surface ("TempBuffer 2586 2560x1440") do not match dimensions of depth surface ("TempBuffer 2595 3840x2160"): (2560, 1440) != (3840, 2160)
    UnityEngine.GUIUtility:processEvent (int,intptr,bool&)

    Any fixes? Thanks!
     
  37. Alterego-Games

    Alterego-Games

    Joined:
    Jul 13, 2015
    Posts:
    320
    You should scale the rendertexture the same as the quality setting of DLSS.
     
  38. Manul_

    Manul_

    Joined:
    Jul 28, 2015
    Posts:
    20
    Would it be possible to expose the dlss sharpness setting to the inspector?
     
  39. Manul_

    Manul_

    Joined:
    Jul 28, 2015
    Posts:
    20
    When enabling and disabling DLSS on the post-processing layer, the mipmap biases don't get resetted. It works with fsr2 (but fsr1 is bugged, too).
     
    Last edited: Oct 1, 2023
  40. Alterego-Games

    Alterego-Games

    Joined:
    Jul 13, 2015
    Posts:
    320
    I’ll add it to my backlog!


    And I’ll checkout this too, thanks for letting me know!
     
  41. Manul_

    Manul_

    Joined:
    Jul 28, 2015
    Posts:
    20
    I found that sharpness does not work anymore since dlss 2.5.1. So I don't need the exposure of the setting. Sorry for not checking earlier.
     
    Alterego-Games likes this.
  42. Alterego-Games

    Alterego-Games

    Joined:
    Jul 13, 2015
    Posts:
    320
    DLSS suggest it best to let the sharpness be auto calculated by itself. Maybe in 2.5.1 the manual option changed. I’ll check it out regardless
     
  43. Olafson

    Olafson

    Joined:
    Aug 7, 2012
    Posts:
    255
    hey. I added the scripting defines manually to the player script defines, but I am still presented with these errors:

    Assets\Alterego Games\AEG DLSS\Runtime\DLSS_UTILS.cs(9,28): error CS0234: The type or namespace name 'NVIDIA' does not exist in the namespace 'UnityEngine' (are you missing an assembly reference?)

    Assets\Alterego Games\AEG DLSS\Runtime\DLSS_UTILS.cs(7,19): error CS0234: The type or namespace name 'NVIDIA' does not exist in the namespace 'UnityEngine' (are you missing an assembly reference?)

    Assets\Alterego Games\AEG DLSS\Runtime\DLSS_UTILS.cs(26,16): error CS0246: The type or namespace name 'DLSSQuality' could not be found (are you missing a using directive or an assembly reference?)


    I assume it has something to do with the DLSS/NVIDA package missing. Is there somewhere I can manually download it? I tried the Post Processing Stack "Install" button and it didn't seem to do anything, was still warning me that the package wasn't installed after pressing the "Install" button. I now restarted Unity and obviously due to the script errors, I no longer have access to the install button.
     
    Alterego-Games likes this.
  44. Alterego-Games

    Alterego-Games

    Joined:
    Jul 13, 2015
    Posts:
    320
    Hi! I’m sorry this is a known bug, easily fixed by adding “ENABLE_NVIDIA_MODULE” as scriptable define in the Player Settings.

    Fix coming soon!
     
  45. Olafson

    Olafson

    Joined:
    Aug 7, 2012
    Posts:
    255
    I did that, but it does not solve the issue.
     
  46. JJunior

    JJunior

    Joined:
    May 22, 2019
    Posts:
    52
    VR support?
     
  47. Alterego-Games

    Alterego-Games

    Joined:
    Jul 13, 2015
    Posts:
    320
    That is weird, I’ll have to look into it… Could you try downloading the demo project? Also what gpu do you have?
     
  48. Manul_

    Manul_

    Joined:
    Jul 28, 2015
    Posts:
    20
    Maybe take a look if the Nvidia package is enabled in the package manager under built-in packages.
     
  49. HarvesteR

    HarvesteR

    Joined:
    May 22, 2009
    Posts:
    525
    There is also an ENABLE_NVIDIA compile flag on the code that appears to be needed in some places.

    I added both of them to my project and it seems to have worked. It does look like DLSS
     
  50. Alterego-Games

    Alterego-Games

    Joined:
    Jul 13, 2015
    Posts:
    320
    Update has gone live, so the compile errors shouldn’t happen anymore!
     
    Manul_ likes this.