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.

Question Where does generated shader for VFX graph live?

Discussion in 'Visual Effect Graph' started by thebarryman, Aug 18, 2022.

  1. thebarryman

    thebarryman

    Joined:
    Nov 22, 2012
    Posts:
    107
    I've noticed that VisualEffectAssets save Shader and ComputeShader assets as children assets, but I'm not sure where the actual Shader code lives. Browsing through the content of the VisualEffectAsset file, I am not seeing anything that looks like shader code. Does anyone have any tips for where to find this? I can see that you can use the Inspector to look at a generated copy of the code, but that is not quite what I am looking for.
     
  2. nekema12

    nekema12

    Joined:
    Oct 7, 2021
    Posts:
    6
    The shader lives in your libraries folder so something like %ProjectRoot%/Library/ShaderCache/shader/ and then whatever the name of your vfx is should be the folder name. Alternatively, you can go into Preferences and enable
    Experimental shader externalization
    under Visual Effects and then go to the .vfx asset and select Externalize and it'll save a .shader file in a folder where that .vfx asset lives.

    upload_2022-8-18_16-13-45.png
     
    thebarryman likes this.
  3. thebarryman

    thebarryman

    Joined:
    Nov 22, 2012
    Posts:
    107
    Thank you! Super helpful