How do I make a boat that doesn't let water enter?,How do I make a boat that water cant get in to

I’ve made a boat in blender, imported a water asset from HolyShift, and wrote a quick script to make it float. Now my issue is that my boat lets water into it. I’ve done some research and only found a lot of suggestions to make custom shaders, and none of mine have worked. Does anyone know how to properly do this? I can get as far as creating a customer shader on a material but then don’t really know what to do in Cg. Alternatively does anyone know an easier way to do this? Thanks in advance.

The easiest way would be to alter the renderQueue of the boat’s material so it renders over the water when the camera is near to it. The renderQueue would have to be reset when the camera is further away because leaving it would cause the boat to be rendered over other objects that it’s behind.

You use a depth mask shader for this type of rendering.
We’ve used the example that’s published on the Unity3D Wiki to achieve exactly that : http://wiki.unity3d.com/index.php/DepthMask?_ga=2.206827987.1753848549.1577525989-100160873.1557425811

Regards,

Koen Matthijs

I just checked and saw that I have the boat set at 2000 in the render queue and the water set to 3000, but I can still see the water through it. I tried using my own custom shaders and it still didn’t work.