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
- Create a new project via the Unity Hub, using the Universal Render Pipeline template.
- In the Package Manager window, click the add icon and select Add package from disk.
- Locate the depthkit.core package folder. Within this folder, select the package.json file and click open.
- Next, repeat this step and locate the depthkit.core.shadergraph. Within this folder, select the package.json file and click open.
- 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.
- 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.
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.
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.
- 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.
- This will generate MyCoreLook, a new shader that is already set up to work with the Depthkit clip.
- 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.
- Once the new shader is created, select it and right click. Select Create → Material.
- 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.
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.
Updated over 1 year ago