Stylized Water 2 - Underwater Rendering (Extension)
2.Getting Started
Base asset
At this point you should already have the Stylized Water 2 asset installed. The Underwater extension will import directly into its folder. Without this installed first, you’ll be posed with at least one unsolvable console error.
Initial set up
To enable underwater rendering in a scene, go to Window → Stylized Water 2 → Set up underwater renderer.
If there is only 1 water object in the scene, the water material and level will be automatically configured for you. Assign the water material that is used in the scene, and set the water level to match the Y-position (in world-space) of the water mesh.
On the water material you’ll now find two paramaters, specific to the shading of the underwater surface
Future work
As of the v1.0.4 a large part of the graphics have been reworked, next to vastly improved performance, landing on a definitive version. Though there is still room for future enhancements.
Directional caustics support for versions older than Unity 2020.2Option to use fast directional caustics (by reconstructing the required depth normals texture from depth)Disable rendering when in prefab edit modeC# API to change the water material and level more easily (this could be used in conjunction with triggers)Refraction masking for objects between the camera and water, when viewed from belowRework shading for underwater surface to include internal reflections- Boundary rendering. Injects a hidden sphere into the fog, to avoid the end of the game world being visible in the distance.
Wishlist:
- Camera entry/exit effects: Water washing over the screen when moving out of the water. And/or splashes as it enters the water. This all needs to be scalable and based on how fast the camera hits the water, otherwise it’s too basic.
- Rendering of water volumes (eg. boxes). Given the fact that this moves much of the rendering onto scene objects, it would require a large revamp. This may be considered if there is a sufficient demand for it and revenue to meet the development time.