Stylized Water Shader Documentation

Stylized Water Shader

Stylized Water Shader
Author: jonathan
Version: 2.1.3
Dated: 19 Mar 2017

2.Compatibility #

Unity version
The minimum supported version is Unity 2018.4, up to 2020.2.

Beta and Alpha versions may work but will not be eligible for support, due to the frequent changes. In many cases, things like automatic shader upgrading isn’t implemented until a release version. Once a release version is available, the package will be tested, and an update may follow with any required changes or fixes.

Scriptable Render Pipeline
The Lightweight, Universal and High-Definition render pipelines are not supported, as are custom pipelines.

For the URP, see Stylized Water 2, which you can currently get with a 20% discount. This upgrade only becomes available if you own this asset already. So having both assets in your cart won’t apply the upgrade discount.

VR
The shaders have been tested using an Oculus Rift where no issues have been encountered. Planar reflections do not work in Single-Pass Stereo Rendering and are automatically disabled.

Oculus Quest/Gear VR

On these platforms, the Oculus SDK strips the depth texture from the build, assumingly as a means of performance optimization. As a result, the depth texture read by the water is entirely black, resulting in infinitely shallow water, and thus becomes 100% transparent (invisible). There doesn’t appear to be any way to disable this behaviour.

Under the “Advanced” tab, you can uncheck the “Enable depth texture” option to circumvent this. Though, at this point the depth and intersection effects will naturally be lost. In this case, these effects have to be painted through vertex colors, as outlined here.

Mobile
The minimum hardware requirement is a GPU compatible with OpenGL ES 3.0. Devices released after 2014 support this, or typically an iPhone 6s.

The shaders offer different lighting methods, the “Unlit” and “Simple” lighting methods are best suited for mobile.

MacOS
Compatible with both OpenGL and Metal. On hardware without a dedicated graphics card (eg. Macbook Air), the water tends to render with checker-like artifacts. This has been identified as a bug in how Unity renders the depth texture, used by the water.

Fog
The water renders to the Transparency queue and does not contribute to the scene’s depth, as such it will not be affected by third-party fog effects. Unity’s standard fog works as expected.

Consoles
Users have reported to have no issues on Playstation 4 and Xbox One. The shaders are “surface shaders”, which means they use Unity’s internal lighting system rather than a custom one. This leads to assume the chance of any graphical or compiling issues are minimal.

I do not have access to any PS4/Xbox dev kits. So if you find yourself having any such issues, please get in touch as I’d be happy to work towards a solution!

No issues found on Nintendo Switch, though the mobile shader should be used for this platform.

Lighting
With the lighting mode set to “Advanced” the shader supports Skybox reflections and Reflection Probes, as well as 3 point lights. Spot lights are not supported.

Reflections
Objects using shaders that render to the “Transparent” render queue cannot be reflected.

Misc
DirectX 9 is not supported, a minimum of Shader Model 3.5 is required. Any graphics card newer than a Radeon X1000 or GeForce 6 will support this.

Yes No Suggest edit
Last updated on January 10, 2021
4 of 4 users found this section helpful
Suggest Edit