Mask for coastline water foam

Best way to solve this task? Like depth fade node, but only on X and Y axis. I`ve tried distance to nearest surface it kinda works, but reqires generation of mesh distance field, and im not sure how it works in mobile situation, and randomy generated geometry.

Sample of what i need

Choose from:

  • Built-in Distance fields

  • Translucent mesh above water

  • Custom 2d distance field just for
    small particular area.

  • Render scene depth into player
    centered top down depth capture and
    detect water edge in additional off
    screen pass.

Pick option number 2 for your case.

1 Like