Shader Graph

The Depthkit Core & Studio Shader Graph packages allow you to render Depthkit assets in Unity's advanced render pipelines like the Universal Render Pipeline and High-Definition Render Pipeline. These pipelines unlock enhanced in-engine lighting effects.

In this page

Depthkit Core + Shader Graph →
Depthkit Studio + Shader Graph →


Depthkit Core + Shader Graph

  1. Create a new project via the Unity Hub, using the Universal Render Pipeline template.
1276
  1. In the Package Manager window, click the add icon and select Add package from disk.
756
  1. Locate the depthkit.core package folder. Within this folder, select the package.json file and click open.
1129
  1. Next, repeat this step and locate the depthkit.core.shadergraph. Within this folder, select the package.json file and click open.
1132
  1. Once imported, you will see the addition of Depthkit Core Shader Graph within the Package Manager. Select this item and expand the Samples toggle. Import Prefabs - Depthkit Core Shader Graph. This will import a Depthkit clip prefab that is preconfigured for your project in URP. This will import a Depthkit clip prefab with an example Shader Graph material to get you up and running with the Shader Graph immediately.
2071
  1. In the Project window, go to your Assets folder and locate the prefab you just imported under Samples → Depthkit Core Shader Graph → 0.1.1 → Prefabs - Depthkit Core Shader Graph. Select the Depthkit Clip + Core Shader Graph Look and drag it into the Hierarchy to populate your scene.
800
  1. Back in the Project window, create a new folder under Assets. You can do this by right clicking in the Project window and selecting Create → Folder. I like to name this folder Clips. This will hold your Depthkit video files, metadata text files, and optional poster images. Drag your Depthkit assets into this folder in the Project window or copy and paste in the explorer window.

  2. Back in the Hierarchy, select your recently created Depthkit clip. See the Inspector. You will notice that the Depthkit Clip component is alerting you that your Depthkit Clip is not set up. No worries! All we need to do is drag the Depthkit metadata file and poster image to the corresponding fields in the Depthkit Clip component. In the Video player component, drag the Depthkit video to the Video Clip field.

800
  1. Once your Depthkit clip is set up, you will see that the clip is already configured with an example Core Shader Graph Look assigned in the Mesh Renderer component. In order to create and apply a custom Shader Graph Look and material, you will need to create a new Depthkit shader and material. You can do this by right clicking in the Project tab, select Create → Shader → Depthkit → Core Look - Shader Graph.
3831
  1. This will generate MyCoreLook, a new shader that is already set up to work with the Depthkit clip.
874
  1. Double click this shader to launch the Shader Editor. This node graph provides complete creative control to design a custom aesthetic for your Depthkit clip.
3811
  1. Once the new shader is created, select it and right click. Select Create → Material.
1402
  1. To get started with this Look immediately, select your Depthkit clip in the Hierarchy, go to the inspector, and in the Mesh Renderer, under materials, replace the example Depthkit Core Photo Look Unlit with your new Material.
3829 1165

Now you can continue to tweak your custom Look in the Shader Graph Editor. Make sure to select Save Asset in the upper right corner so apply all design changes to your clip.



Depthkit Studio + Shader Graph

After importing the depthkit.core and depthkit.core.shadergraph packages as described above, import the depthkit.studio and depthkit.studio.shadergraph packages as well.

Select the Depthkit Studio Shader Graph package in the Package Manager. Under Samples, import the Depthkit Studio Shader Graph prefab.

Set it up like a regular Depthkit Studio clip, and edit the Look as described for Depthkit Core + Shader Graph above.