bob0815
bob0815

Reputation: 21

How do I render the depth map using Unity URP?

I want to recreate the "Moebius" style in Unity. I have found this video where someone achieves it, but he only shares the concept and the result and not the source code.

Here are some snippets from that video:

Original scene: Original scene

Depth map: Depth map

Sobel filter: Sobel filter

"Moebius" style: "Moebius" style

Since the first step is to detect the edges in the scene and draw those I have looked around and found a couple of other videos focusing on outlines:

Among those videos there are also two Github repositories referenced:

I've noticed that all those are fairly out of date. So I don't know if it's because of that or because I am new to scripting render pipelines, but I couldn't get it to work.

To understand the basics it would be great to know how to render the depth map of the scene, more specifically the DepthNormals, like shown in the first video. Ideally by using a shader, so I can work with a shader graph to achieve the rest, but I don't know how to apply a shader to the whole scene / camera.

I should mention that I am using Unity 2022.2.19.

Upvotes: 0

Views: 1645

Answers (0)

Related Questions