Outline shader with lines getting thinner if camera is farther away

I followed a tutorial on how to get a post process material for outlines and it’s working pretty well.

The tutorial I watched mentioned that there was a way to have the outlines get smaller or disappear if the camera is far away enough from it. But it didn’t go over how to do so, and I don’t know if he goes over it in future videos either.

Are there any recommendations on how I should go about it?

This is the tutorial I used: