Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

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:
    79
    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.
     
    AlejMC and AbgaryanFX like this.
  2. mutp

    mutp

    Joined:
    Oct 1, 2018
    Posts:
    79
    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:
    148
    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:
    9
    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:
    148
    NavidK0 likes this.
  7. NavidK0

    NavidK0

    Joined:
    May 19, 2013
    Posts:
    9
    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:
    9
    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
    SearchTree, AlejMC and andybak like 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:
    9
    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:
    9
    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.
     
    SearchTree, AlejMC and karlanton98 like 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.
     
    AlejMC and NavidK0 like this.
  15. Stephanommg

    Stephanommg

    Joined:
    Aug 18, 2014
    Posts:
    88
    Hi NavidK0. I tried your steps but it didnt work.
    This is the error I get:
    upload_2022-5-9_1-51-9.png

    It is not much clear to me if this works in Unity 2020.3 or just Unity 2021.
    I placed the files in the packages folder, nothing happened. Then, I edited the manifest.json to make shader graph have version 11.0.0. I am not sure if this is the correct edition. I am also not sure what was supposed to change in the manifest.json when you said "v11 of the the render-pipelines core ".
     
  16. aaaaaieeeeeeeee

    aaaaaieeeeeeeee

    Joined:
    Aug 17, 2014
    Posts:
    9
    You're my favorite human of this Year!! :D
    It seems to work flawlessly in 2021.2.13f1
    this means both shader graph and VFX graph are able to be used with built in render pipeline :cool:
     
    NavidK0 likes this.
  17. aaaaaieeeeeeeee

    aaaaaieeeeeeeee

    Joined:
    Aug 17, 2014
    Posts:
    9
    Hey mate
    thanks again for sharing the repository that allows using VFX Graph in standard pipeline. I cannot use any scriptable render pipeline because I am reliant on a lot of important and custom made built in shaders.

    in the new version (2021.2.13f1) Shader graph too is now able to be used for standard render pipeline.

    So in other words both VFX Graph and shader graph.

    I noticed that however when I tried to make a VFX Graph Shader Graph (A shader graph Particle Shader) I get these crazy shader error when I add it to VFX Graph :oops:



    I'm an VFX Artist and being able to add Custom Shaders to VFX Graph is kind of important :(
    Do you maybe know a workaround?
     
  18. NavidK0

    NavidK0

    Joined:
    May 19, 2013
    Posts:
    9
    It's likely that the new version of the Shader Graph is only compatible with the new version of the VFX Graph. That means you won't be able to add new shaders to the old VFX Graph since there's no code to support it.

    We could update our fork to support this functionality, but unfortunately I haven't had any time for gamedev for quite some time, so I can't promise that I'll be able to put it in. Sorry! :(
     
    aaaaaieeeeeeeee likes this.
  19. moroc

    moroc

    Joined:
    Jan 20, 2014
    Posts:
    12
    Thank you for fork It works Ok. But I get error during compile:
    Shader error in 'Hidden/VFX/DRK Surrounding/System/Output Particle Quad': invalid subscript 'stereoTargetEyeIndex' at Files/Unity/Hub/Editor/2021.3.8f1/Editor/Data/CGIncludes/UnityCG.cginc(804) (on d3d11)
    Compiling Subshader: 0, Pass: , Vertex program with STEREO_INSTANCING_ON
    Platform defines: SHADER_API_DESKTOP UNITY_COLORSPACE_GAMMA UNITY_ENABLE_DETAIL_NORMALMAP UNITY_ENABLE_REFLECTION_BUFFERS UNITY_LIGHTMAP_FULL_HDR UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_PASS_FORWARDBASE UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BLENDING UNITY_SPECCUBE_BOX_PROJECTION UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS
    Disabled keywords: SHADER_API_GLES30 UNITY_ASTC_NORMALMAP_ENCODING UNITY_ENABLE_NATIVE_SHADOW_LOOKUPS UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_LIGHTMAP_DLDR_ENCODING UNITY_LIGHTMAP_RGBM_ENCODING UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_NO_DXT5nm UNITY_NO_FULL_STANDARD_SHADER UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2 UNITY_PBS_USE_BRDF3 UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION UNITY_UNIFIED_SHADER_PRECISION_MODEL UNITY_VIRTUAL_TEXTURING
     
  20. Marie_G

    Marie_G

    Unity Technologies

    Joined:
    Mar 9, 2021
    Posts:
    69
    Hi, VFX Graph is and will always be fit for SRPs only (URP and HDRP). There is no plans for Built-in support.

    If you are working on built-in, we recommend to stay on Particle System to make sure you don't have any issues. Even if you found ways to make VFX Graph work on built-in, you might encounter bugs for various things, especially project version changes.

    If you want to use VFX Graph, using URP or HDRP is the way to go.
     
    NavidK0 likes this.
  21. Titaniums

    Titaniums

    Joined:
    Apr 10, 2015
    Posts:
    1
    I understand that this may be a choice due to some reason or another but the reason why some of us want this on Built In is because some store assets only have support for the built in pipeline. I think it would be best to support Built-In to help ensure potential sales aren't sabotaged for some Asset Store contributors by making us choose between supporting the store or choosing additional functionality.
     
    smash-ter and Stephanommg like this.