Water transition from surface to underneath

Currently i’m making a game with the latest hdrp update, unity 2019.2.17f1. My end goal is to achieve a water transition like this screenshot. How did Subnautica have the underwater effect only affect the portion of the screen that is under water. Would you build this with a shader if so please answer in shader graph format? Some help getting this started would be very appreciated.

The underwater look is usually done via post processing. But it’s a tough nut to crack.
In fact, if you notice, most games don’t have a good implementation, they either hide the transition from over the water to underwater or they just say screw it and you can clearly see when the post processing change happens.
The first game with a really good implementation that I noticed was Far Cry 3, looking into it I discovered that the underwater look is done via post processing, and it is masked by the waves position on the screen.
So you have 2 post processing layers happening, one for the game over the water and one for the game underwater, when you position the camera in such a way where you can see half of each, like in your screenshot, these post processing effects are masked by the waves position on screen so that the underwater look doesn’t bleed outside or the other way around.

I have not used the shader graph yet so I don’t know it’s limitations, but if you can create a custom post processing material with it, kind of like you do in UE4 if you are familiar, and get the position of vertices of a mesh, (the water surface), you could in theory do it.

1 Like