Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Experimental SRP for testing new features

Discussion in '2018.3 Beta' started by rizu, Sep 12, 2018.

  1. rizu

    rizu

    Joined:
    Oct 8, 2013
    Posts:
    1,194
    EDIT: branch REMOVED for the time being, what is in current SRP releases is way more up-to-date already. I might return with some other experimental branch in the future.

    I made an experimental branch for my SRP fork on github:
    <link removed>

    The point of this branch is to make it easier to test new things out, do not use it for anything but testing as most of these are just merges from WIP branches from SRP github.

    No promises on keeping the branch up-to-date either, just thought I'd share it as many probably want to try out these new feats even while they are still WIP. I'll probably keep merging new changes in every now and then and updating the merged techs until they find their way to SRP repo.
     
    Last edited: Nov 24, 2018
    TerraUnity, mgear, Deeeds and 2 others like this.
  2. rizu

    rizu

    Joined:
    Oct 8, 2013
    Posts:
    1,194
    edit 2-> you can now just ref using "file" approach on latest 2018.3 betas so the workaround below is not needed anymore.

    edit-> Unity confirmed that the shader includes will work properly on upcoming betas, so you only need to use the following approach temporarily with current 2018.3 betas:

    After recent SRP master change, you no longer can use the "file" ref in project manifest for SRPs. To use these now your alternatives are to either to copy or to symlink the related folders to your projects Packages -folder (don't add anything to manifest for these, if you have existing HDRP etc in manifest/package manager, do remove them before trying).

    So in the nutshell, to try all these feats your project Packages folder should have following folders from this git repo:
    additionally you should install the latest PostProcessing stack from the package manager or by manually adding following to your projects manifest.json:
     
    Last edited: Oct 25, 2018
  3. jawasjnsdjn

    jawasjnsdjn

    Joined:
    Mar 7, 2013
    Posts:
    22
    Would be ecstatic to try this out but I could not figure out how to get it to display on openvr it just turns the scene and game view black.
     
  4. rizu

    rizu

    Joined:
    Oct 8, 2013
    Posts:
    1,194
    have you installed openvr package from package manager and enabled it also from player settings (xr settings)?

    edit-> also make sure you have support for forward-only and have enabled forward only from your HDRP asset.

    do note that VR mode doesn't work properly yet but at least it's coming to HDRP finally :) it has issues like this for example: https://www.dropbox.com/s/qdp6dy7abvchs0o/hdrp_vr_issue.gif?raw=1

    oh and also try just restarting the editor, sometimes it needs a refresh if you've had different SRPs installed before, in worst case you may need to wipe your project folders library and let it regen it all
     
    Last edited: Sep 21, 2018
  5. Grimreaper358

    Grimreaper358

    Joined:
    Apr 8, 2013
    Posts:
    572
    I think that way is being phased out because you can now add local packages from the package manager.

    upload_2018-9-16_17-48-6.png
     
  6. rizu

    rizu

    Joined:
    Oct 8, 2013
    Posts:
    1,194
    Actually that new menu option only automates the package referencing process, if you look at the generated manifest it uses that "file" ref.

    If you add current SRP master using the menu entry you just posted, it will not compile shaders properly.
     
  7. Grimreaper358

    Grimreaper358

    Joined:
    Apr 8, 2013
    Posts:
    572
    yea just tried it and it's the same as doing it manually.
     
  8. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,399
    I kind of suspect that they broke the file method of using HDRP by accident, and they will fix it at some point, but I am only guessing.
     
  9. rizu

    rizu

    Joined:
    Oct 8, 2013
    Posts:
    1,194
    Currently approach that works (full or relative paths) is bit of pain with the shaders, I'd rather hope they fix that to support package refs in shader includes like they do on SRP master now (also possible they've internally changed this already, who knows). The fix shouldn't even be that difficult, considering they already do it for "Assets" folder atm, they just need to make the shader compiler include Packages similar way. Also do note that package refs do work on c# code even now, they only don't work with shaders.
     
    Last edited: Sep 21, 2018
  10. rizu

    rizu

    Joined:
    Oct 8, 2013
    Posts:
    1,194
    Last edited: Sep 18, 2018
  11. rizu

    rizu

    Joined:
    Oct 8, 2013
    Posts:
    1,194
    Updated the package for latest master and VFX editor.

    Since they've merged so many of the PRs already, only additional things atm are HD Lit Master Node (which looks likely to get merged into master any moment now) and VFX Editor.

    Unity also now bumped the SRP version number to 4.0.0-preview (it's still 2018.3 compatible).

    edit-> Added Micro shadowing PR and updated HD Master Lit Node.

    edit 2-> Micro shadowing and HD Lit Master Node are now in master so updated this to latest master and only added VFX editor for now.
     
    Last edited: Sep 24, 2018
    Lex4art and Grimreaper358 like this.
  12. sybere

    sybere

    Joined:
    Mar 26, 2015
    Posts:
    156
    Hello!

    Can i get some info about how can i add this to my test project? now its a normal project without srp
     
  13. rizu

    rizu

    Joined:
    Oct 8, 2013
    Posts:
    1,194
    If you haven't used SRPs before, I'd suggest trying these on HD Template first by using the second post on this thread as guide. Otherwise, do what the second post instructed and treat like HDRP in general.
     
  14. sybere

    sybere

    Joined:
    Mar 26, 2015
    Posts:
    156
    so if i install hdrp from package manager, after i only need to override my projects folders with folders from your repo ? i used srp before but i only isntalled from package manager
     
  15. Grimreaper358

    Grimreaper358

    Joined:
    Apr 8, 2013
    Posts:
    572
    Just download the folders for his repo and then place them in the packages folder and you're good to go. No need to download from the package manager.
     
  16. sybere

    sybere

    Joined:
    Mar 26, 2015
    Posts:
    156
    Packages folder inside my project folder?
     
  17. rizu

    rizu

    Joined:
    Oct 8, 2013
    Posts:
    1,194
    yes, and remove the HDRP from your manifest.json if you have that there already, otherwise there will be a duplicate.

    Do note that the current experimental version only brings vfx editor as extra to Unity's own master. If you don't care about that, you may as well just use their master directly.
     
  18. sybere

    sybere

    Joined:
    Mar 26, 2015
    Posts:
    156
    i would like to take a look especially to the vfx so i will try, thank you!
     
  19. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,379
    is this specific for beta 2?
     
  20. rizu

    rizu

    Joined:
    Oct 8, 2013
    Posts:
    1,194
    if you mean the branch in question then it only runs on 2018.3.0 betas atm. There's no support for older unity versions on SRP master or VFX editor (both require 2018.3).
     
  21. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,379
    Ah sorry i mean it is only work with 2018.3 beta 2 or i can use previous 2018.3 beta version?
    Oh btw it seems i cannot see the new shadow system, is it in the experimental branch?
     
  22. Grimreaper358

    Grimreaper358

    Joined:
    Apr 8, 2013
    Posts:
    572
    yea it should be in but it's on the HDRP asset not directly on the lights - although if you change on the asset to High, you get extra options on the lights that you can tweak.

    upload_2018-9-26_10-52-45.png
     
  23. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,379
    ah, i set them to medium, maybe that's it. Yeah it was the shadow option.
    But it seems only works on forward only. Is it just me or that is a known bug? also contact shadow seems not working.
     
    Last edited: Sep 26, 2018
  24. Davood_Kharmanzar

    Davood_Kharmanzar

    Joined:
    Sep 20, 2017
    Posts:
    325
    nice ...

    can you implement some of plugins of Book of the Dead project into this custom SRP like as:
    AtmosphericScattering , LayerCulling , PropertyMaster , StaggeredCascade , WindControl , LightmapOcclusion?

    thanks.
     
    hugokostic likes this.
  25. Grimreaper358

    Grimreaper358

    Joined:
    Apr 8, 2013
    Posts:
    572
  26. rizu

    rizu

    Joined:
    Oct 8, 2013
    Posts:
    1,194
    BOTD SRP is possible to port for latest SRP master but it's a huge task, one wouldn't do that just for kicks unless you really need some feat from it. Also working with unreleased version of SRP as basis is always risky, for bigger changes like these you'd want to base it on existing release (or wait for next release) before even starting.

    Anyway, it's not likely that'd I'll do full ports of BOTD SRP in future but I'm sure Unity will (they already updated BOTD SRP one from 2.0.0 to 2.0.5'ish).
     
  27. Davood_Kharmanzar

    Davood_Kharmanzar

    Joined:
    Sep 20, 2017
    Posts:
    325
    I'm confused :confused:
    so, do you update it or not??

    or is it possible to implement at least WindControl and AtmosphereScattering to this custom SRP??
     
    Last edited: Sep 27, 2018
  28. rizu

    rizu

    Joined:
    Oct 8, 2013
    Posts:
    1,194

    I can't tell for individual features yet, it really depends if I need those myself or not. But like mentioned earlier, Unity will probably update BOTD SRP themselves so better wait for them to do at this stage.

    Porting individual features shouldn't be that hard, a lot of the folder structures have changed but most of the files themselves are still using same names so you should find the relevant parts rather easily. Also since Unity has commented the code changes pretty nicely, it should be easy to tell what changes one needs to pick for specific feature. I have BOTD environment v1.1 SRP diff toward regular 2.0.5 (+few commits) SRP here: https://github.com/0lento/ScriptableRenderPipeline/commit/a969c38a31279fd9ecda2e847b5fb9e6fa8bb899
     
  29. rizu

    rizu

    Joined:
    Oct 8, 2013
    Posts:
    1,194
  30. rizu

    rizu

    Joined:
    Oct 8, 2013
    Posts:
    1,194
    There's upcoming fix for this https://github.com/Unity-Technologies/ScriptableRenderPipeline/pull/2071

    Unity is pushing new PRs into 4.0.0 at fast pace now (I read a comment on their github that they planned releasing it on wednesday already but clearly that didn't happen), I expect them to include the fix soon as well. (edit: fix didn't make it into 4.0.0 but I made a new experimental version with it)
     
    Last edited: Sep 28, 2018
  31. rizu

    rizu

    Joined:
    Oct 8, 2013
    Posts:
    1,194
    Unity released 4.0.0-preview so I pushed a new version of experimental SRP too. It now includes 4.0.0-preview and on top of it latest VFX editor, contact shadows fix and screen space shadows improvements.

    @Reanimate_L, contact shadows now work on this version (in both deferred and forward) but PCSS shadows are still limited to forward only.
     
    Last edited: Sep 28, 2018
    Reanimate_L likes this.
  32. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,379
    pulling it now
     
  33. Davood_Kharmanzar

    Davood_Kharmanzar

    Joined:
    Sep 20, 2017
    Posts:
    325
    is it possible to implement MSAA on older versions of HDRP ... like as 2.x.x?
     
  34. rizu

    rizu

    Joined:
    Oct 8, 2013
    Posts:
    1,194
    I doubt it, I think it relies on some engine code changes that simply isn't included in 2018.2 and they can't change the 2018.2 API after 2018.2.0 got out so it's locked to what it is now. Unity usually does backport important feats if they are API compatible but I honestly don't think MSAA is included on that list.

    Also worth noting that MSAA support isn't fully featured and bug free yet. We are lucky if it even works properly on final 2018.3.
     
  35. Davood_Kharmanzar

    Davood_Kharmanzar

    Joined:
    Sep 20, 2017
    Posts:
    325
    I'm confused again !?

    the MSAA is the default feature of HDRP 4.x ??
    or its an custom feature that supplied by you ??
     
  36. Davood_Kharmanzar

    Davood_Kharmanzar

    Joined:
    Sep 20, 2017
    Posts:
    325
    @rizu

    and another question?
    what is the best method to get rid of jagged edges on HDRP ?? does exists an super anti-alias method??
     
  37. rizu

    rizu

    Joined:
    Oct 8, 2013
    Posts:
    1,194
    It's feature in 4.0.0-preview as can be seen in the change notes here:
    https://github.com/Unity-Technologi...render-pipelines.high-definition/CHANGELOG.md

    What I meant it isn't included on "list" was my guess if Unity plans on backporting HDRP MSAA into 2.x.x as I doubt it's not even possible due to the engine level changes.

    also as stated in the original post:
    meaning that there isn't my own work here, I just merge what Unity does and occasionally fix some small issues to make it run (their random WIP branches aren't always based on latest SRP version so some changes are occasionally required to make them run on latest master).

    This is out of scope of this threads topic, you might get better answers if you post this question in https://forum.unity.com/forums/graphics-experimental-previews.110/
    Anyway, standard PP AA exists even with HDRP, use it exactly like you'd use it with legacy renderer with PP stack v2.
     
    Last edited: Sep 30, 2018
  38. Davood_Kharmanzar

    Davood_Kharmanzar

    Joined:
    Sep 20, 2017
    Posts:
    325
    good job ;)
     
  39. Morillan

    Morillan

    Joined:
    Mar 6, 2013
    Posts:
    6
    Hi, can anyone help me with the installation. Everytime I tried to install the master branch or the one in this forum, I got stack here:

    - After cloning you will need to edit your project's packages.json file (in either UnityPackageManager/ or Packages/) to point to the SRP submodules you wish to use.

    - After the repo has been cloned you will need to run the following console commands from the ScriptableRenderPipeline folder:

    > git checkout Unity-2018.1.0b2 (or the latest tag)
    > git submodule update --init (This command fetches the Postprocessing module, which is needed to use SRP)

    I have an artistic background and I Just don´t know what to do. I would love to use the new features released in here.

    Please Help!!

    Thank you.
     
  40. rizu

    rizu

    Joined:
    Oct 8, 2013
    Posts:
    1,194
    Ah, with my repo, you'd run git checkout experimental if you prefer using git (but it defaults to that already atm so it should be at that branch after git clone)

    But since you can use the stock PP stack from package manager, you don't really need to update the submodules, basically if you don't want to deal with git, just download the experimental branch as zip and then use the packages mentioned on second post here with your project.
     
  41. Morillan

    Morillan

    Joined:
    Mar 6, 2013
    Posts:
    6
    Thank you!. I had no idea I could do it without using git.

    I don´t know if this is a silly question but, What should I do with the folder from the Zip file, should I copy it in my project or can I just do it through Package Manager?.

    Thank You and sorry to bother you with these questions.
     
  42. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,399
    I'm not exactly Mr Github but I think the submodule thing was changed some months ago anyway? Certainly when I used the submodule init command I dont get any interesting console messages anymore, and the last comment next to the .gitmodules file from a few months ago says 'Remove pp submodule'.

    edited to add - further to that, I think postporocessing is handled automatically now without it either coming via git submodule or needing to select it yourself in package manager, because its listed as a HDRP dependency in the package.json file under com.unity.render-pipelines.high-definition.

    If I'm right about this then the readme needs an update!
     
  43. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,399
    Try this, hopefully I got it right. Asssuming its the HDRP you want to try, you should simply copy the following folders from the zip to the Packages folder that exists at the root level of your unity project folder:

    com.unity.render-pipelines.core
    com.unity.render-pipelines.high-definition
    com.unity.shadergraph

    So for example you will now have folders called YourProjectFolder/Packages/com.unity.render-pipelines.core etc.

    If you have any of those packages already mentioned in your manifest.json file that already exists in that same Packages folder, remove them.

    If you want to try the VFX system or some of the test scenes then there is more stuff to copy but try the above first and see if it works. You may need to restart unity once or twice after loading the first time in order for everything to work.
     
  44. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,399
    On a vaguely related note, rizu do you know if the 'reference SRP locations via FILE: stuff in manifest.json' method work again now with current 2018.3 beta or do we still have to use the 'put the files in Packages' workaround?
     
  45. rizu

    rizu

    Joined:
    Oct 8, 2013
    Posts:
    1,194
    It should work now on beta 3 but I actually haven't had time to test it.
     
  46. Morillan

    Morillan

    Joined:
    Mar 6, 2013
    Posts:
    6
    I copied those three folders and It Worked!! Thak you guys.

    But I can´t find the High quality settings in my light to set up shadow softness, am I missing something?
     
  47. rizu

    rizu

    Joined:
    Oct 8, 2013
    Posts:
    1,194
    It's not in lights settings, it's on your HDRP asset as that setting affects all lights.
     
  48. Morillan

    Morillan

    Joined:
    Mar 6, 2013
    Posts:
    6
    Found it !! I increased Directional Shadow Quality to high. I have access now to High Quality Settings in my light but they don´t seem to do anything to my shadows. Looks like they are disabled or I have to do anything else.

    I copied these folders in my Packages folder in my unity project:

    com.unity.render-pipelines.core
    com.unity.render-pipelines.high-definition
    com.unity.shadergraph

    It works but I don´t know if any of the other stuff I didn´t copy from the Zip file are related to Shadow Quality. May be my project is all messed. Thank you anyway :)
     
  49. rizu

    rizu

    Joined:
    Oct 8, 2013
    Posts:
    1,194
    @Morillan
    I'll probably do more updated version tomorrow, will check the most recent limitations then as well.
     
  50. Onigiri

    Onigiri

    Joined:
    Aug 10, 2014
    Posts:
    88
    Hi! Can you also add postFX branch?