How to fix the white jagged outlines in the rendered output around meshes?

Hello, what caused these white lines and how can I fix them, they only appear around the boundaries with the water shader, which is a custom URP shader graph I made.

image

This depth shader saturates the depth value before sending to the Lerp node, and it is causing the while outlines.

image

If I simply attach a float value, the white lines go away.

image

No white outlines with a float value.

image

Setting Anti-Aliasing to Disabled also removes the outline, but then everything will be jagged, which is not what I want.

Can anyone explain why the saturate node not doing its job, and how to fix it?

Thanks.

I “fixed” the issue by changing the URP rendering pipeline to deferred rendering. There are no white jagged lines now, but I still don’t understand why it happens. I believe it has something to do with the scene depth values at the edge between different materials and mesh models.