just made from scratch to include waves and not draw on top of a stencil
the gist of it is
IF
A = Abs world - Z value (which isn’t world z btw, I had to hand adjust) - B Mask
B = Z value straight up
A>B = 0
both
A==B
A<B
connect to another if:
IF
A = Custom Stencil - Mask R
B = Number of stencil for water
A>B = 0
A==B = 0
A<B = 1
is your Lerp Mask (between 0 Not there and 1, masked) so you plug the result of the second nested if into Lerp.
The rest is the colors of the post-process via Scene Texture input multiplications.
many thanks to** @** for the theoretical ![]()