- Home /
Question by
coling1 · Jul 04, 2018 at 07:39 AM ·
shadersvolumepost-process-effectunderwaterdepthmask
Apply underwater effect below a deformed surface mesh's vertices?
What is the best way to apply an underwater effect below a deformed ocean plane as shown in the image? In other words, how do you draw this effect below moving waves? Many effects simply snap to an underwater effect when the camera is below a certain height, but this is inaccurate and doesn't account for ocean waves with vertices at different heights. Is there a method for masking out these effects based on the vertex positions of the surface mesh similar to using camera depth masks, or by creating a volume of some sort below the surface? Subnautica pulled it off really well. Any insight is greatly appreciated.
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612170016im_/https://answers.unity.com/themes/thub/images/avi.jpg)