Hi there!

After hours of Google, copy-pasting codes and playing around, I still could not find a solution to my problem and am now asking for your help:

I try to write a postprocessing shader using the vertex and fragment functions. My problem is that I want to know the radial distance of the current vertex to the camera position (or a given position) in world coordinates.

My goal is the following: Consider a very big 3D plane where the camera is on top and looks exactly down to the plane. I now wan a postprocessing shader that draws a white line onto the plane, but only for those pixels that have a certain radial distance to the camera. The expected result should be a white circle in this setup.

I know how to do this in principal, but the problem is that I cannot find out how to compute the radial distance to the vertex. Could someone please help me out?

The problem here might be that this is a POSTPROCESSING shader. So this shader is not applied to a certain object. If I would do so, I could get the world coordinates of the vertex by using `mul(unity_ObjectToWorld, v.vertex)`

(if I remember correctly), but for postprocessing shaders this gives a nonsense value.

(btw: How can I create a word wrap with a blank line in this non-awesome editor? My question is just a block of text, almost unreadable for myself …)