Water shader not working in orthographic camera

So I have looked around for some low poly water shaders online and have followed a few tutorials to create my own stylized version. I want my water to have the “foam” near the shore, and I got a working version of this in the shadergraph, but the issue is that the tutorials only have a working version for perspective cameras. The shader does not work for orthographic cameras and it would be perfect if there was a way around this in the shadergraph that anyone knows of.

Here is a picture of what i got so far:

This only works in perspective view.

Shader Graph subforum → Unity Engine - Unity Discussions

The examples most people have for doing depth comparison effects in Shader Graph assume you’re using a perspective camera view. The same math doesn’t work if you have an orthographic camera view. I posted an example of how to do it for orthographic here:

I am having a slight issue with the shader graph you mentioned in that thread. My outcome when I implemented it was a black outline instead of white. Is there a way to add a color to it or fix the issue? Also is there a way to move this post to the other shader graph subforum? I didn’t see it when I made this post.

Here are some pictures:

Throw a OneMinus node on at the end.

You sir, are a legend! I got it working properly now. How do you know all of this stuff? I see you on almost every single post on this forum.