Outline shader with line getting thinner if further away

Can you share the tutorial?. And what do you think about using a camera vector to adjust the line width as per the distance?