Search Unity

How to mask space under the mesh?

Discussion in 'General Graphics' started by Jakub27blue, Aug 29, 2021.

  1. Jakub27blue

    Jakub27blue

    Joined:
    Feb 27, 2018
    Posts:
    2
    Hello everyone, I want to create a waterline effect but am having trouble finding an area that is underwater and which is not.
    What's the best way to do this?
    I can see the waterline effect is created by post-processing. The only problem is masking the area underwater.
    Z-buffer is probably not suitable as some of the water pixels may not be visible on the screen.
    I wonder if generating a 3d mesh under the waterline is the right way to do this?
    What better way to mask this area?

    Related Topics:
    https://forum.unity.com/threads/waterline-underwater-splitscreen.1007648/
    https://forum.unity.com/threads/abo...o-share-even-a-hint-of-how-to-make-it.944373/