Search Unity

VFX Graph with legacy render pipeline

Discussion in 'Visual Effect Graph' started by mutp, Aug 3, 2020.

  1. mutp

    mutp

    Joined:
    Oct 1, 2018
    Posts:
    78
    Hello,

    I'm wondering if anyone has managed to successfully use the VFX graph with the built-in render pipeline. I've got it working but I wanted to know if there are any obvious downsides apart from it not being officially supported by Unity. I only have to do this because I need GPU particles but got to stick to the built in render pipeline for a number of reasons.
     
    AbgaryanFX likes this.
  2. mutp

    mutp

    Joined:
    Oct 1, 2018
    Posts:
    78
    UPDATE: There don't seem to be any obvious downsides (aside from the lack of support for built-in). The biggest thing for me however is that I can't get it to work XR Plugin Management Single Pass Instanced (SPI). Works fine in MultiPass but not in SPI.

    Anyone got this working?
     
  3. wlad_s

    wlad_s

    Joined:
    Feb 18, 2011
    Posts:
    140
    Hi,
    Please, could you share how you made VFX graph work in the built-in pipeline?
     
  4. MillerMark

    MillerMark

    Joined:
    Nov 29, 2018
    Posts:
    2
  5. NavidK0

    NavidK0

    Joined:
    May 19, 2013
    Posts:
    7
    Apparently, I was able to get it to work by using an older package version, aka 10.3.2. It seems compatibility was removed in version 10.4.0. But since there's zero support for it, your mileage may vary moving forward. You'd have to manually backport bug fixes yourself... (that being said, v10.3.2 seems to still work in 2021.1.14f1...)
     
  6. wlad_s

    wlad_s

    Joined:
    Feb 18, 2011
    Posts:
    140
    NavidK0 likes this.
  7. NavidK0

    NavidK0

    Joined:
    May 19, 2013
    Posts:
    7
    Nice! I tried that asset but unfortunately, it didn't seem to work out for our project due to a few bugs. I ended up forking the VFX Graph and backporting v11 updates to v10.3.2 to keep built-in compatibility while applying bug fixes. It seems to work for now (and all of our effects still work with 2021, which is nice).
     
    wlad_s likes this.
  8. karlanton98

    karlanton98

    Joined:
    Nov 6, 2016
    Posts:
    7
    Trying to replicate this. However, i can't find any downloads now to previous versions of the VFX graph, any tips on how you've done this? :)
     
  9. NavidK0

    NavidK0

    Joined:
    May 19, 2013
    Posts:
    7
    Sure, the forked code is public [here].

    I basically diff'd and merged the updates from future versions into v10.3.2, which is the last version that still worked with the built-in pipeline. You can find versions in their [VFX graph changelog]. I have only backported up to v11 so far.

    Disclaimer: It is *quite* jank, and I make no guarantees that it will work into the future. ;)
    It still works for us in 2021.1.20f1, though, so that's good. The URP and HDRP don't have everything we need yet, so this has allowed us to stick with the built-in render pipeline while keeping most of the effects we've created in the past.
     
    Last edited: Sep 12, 2021
    andybak likes this.
  10. karlanton98

    karlanton98

    Joined:
    Nov 6, 2016
    Posts:
    7

    Ah sweet! Well done:)
    Yeah same for me. Also, URP is abit too low end and HDRP too high end. Built-in is quite perfect..

    Hmm, can't seem to find any versions to download in their changelog. Am i blind or have they removed it?
    Trying to use this in 2020.3.17f, the only shadergraph there is 10.6. Is shadergraph v11 required since you've upgraded the VFX graph to this version? I presume they are supposed to have the same version...

    TLDR: Not sure how to make it work. :(
     
  11. NavidK0

    NavidK0

    Joined:
    May 19, 2013
    Posts:
    7
    As far as I know, you need to edit the Packages/manifest.json manually to download versions that are hidden from view. However, that should be unnecessary for this purpose.

    As for the forked code, all you need to do is clone/copy the repo into your Packages folder located in your project directory. Then it should show up in your project. It should automatically synchronize the dependencies. In the case it doesn't, v11 of the shader graph and v11 of the render-pipelines core is required, so make sure you edit the manifest.json accordingly if that happens.
     
  12. karlanton98

    karlanton98

    Joined:
    Nov 6, 2016
    Posts:
    7

    Thanks for the continued help! Getting some errors after following your steps however. o_O


    upload_2021-9-13_16-55-2.png


    Installed 2021.1.20f1, put the repo in packages upload_2021-9-13_16-55-30.png

    Installed shadergraph 11.0, it worked and i can create a VFX graph asset. However, when i create it and place it in the scene those errors happens. Tried changing to linear instead of gamma color space, forward / deffered etc.
     
  13. NavidK0

    NavidK0

    Joined:
    May 19, 2013
    Posts:
    7
    Turns out I had a small typo in Shaders/VFXCommon.hlsl that prevented the shaders from compiling. I am a little embarrassed to admit that it took longer than I wanted to hunt it down, lol... the typo prevented the shaders from compiling when the VFX effects were set to local space. Of course, all of the effects we have are in world space. :oops:

    Anyways, it should be working now with the latest push.
     
    karlanton98 likes this.
  14. karlanton98

    karlanton98

    Joined:
    Nov 6, 2016
    Posts:
    7

    Hahaha no worries! You're very helpful to someone without shader knowledge so thanks alot for providing this :D:D

    Yep, worked flawlessly ! Thanks once more.
     
    NavidK0 likes this.
unityunity