Edges of objects also rendered by depth buffer.


PostTue Apr 17, 2018 7:15 pm

Hello all,

I've recently gotten into shader forge and I'm trying out a few ideas. I'm currently creating a water shader where I'm using the
depth buffer to give my water a bit of a foam edge. All works fine but objects that are ABOVE of the plane I use as water also
get a very small line of foam rendered on their edges.

For this topic I created a different shader to really emphasize on the problem by upping the contrast as much as possible.
Below a picture to clarify my problem:

I suspect that this has to do something with how the depth buffer works in that the difference between when an object is actually beneath the plane and when it's over the plane is not distuingisable?

Can anyone offer me some advice on how to tackle this issue?


I forgot to include a picture of the shader forge nodes:

Return to “Questions”

Who is online

Online users: No registered users and 0 guests