Stylized Water 2 is now available

The original Stylized Water Shader asset released back in 2016, and has seen a number of updates, including a complete revamp in 2018. It was personally a great pleasure to see the shader pop up in games from time to time!

Ideas for improvements steadily rolled out over time. Yet many required major changes to structure and usability. This lead to the point of them never actually being realized. With the introduction of the Universal Render Pipeline, it could also no longer be used in projects that utilized URP. To make this work, it required the shader to be rebuild from the ground up.

While somewhat frustrating, this posed an obvious opportunity to start fresh, and create a new asset altogether. Stylized Water 2 is that sense a continuation of the original Stylized Water Shader, but by all means an evolution.

The most notable change in Stylized Water 2 is that it’s now built entirely for the URP. Next to being completely hand-written. Stepping away from node-based shader editors allowed for an even more efficient shader, that is more flexible when it comes to third-party integrations.

Custom shading model
Unity’s shading model is no longer directly used, but broken up into its various parts. The bounds of PBR shading could be overcome this way. Sun and environment reflections can be now controlled separately, rather than being bound to a single “smoothness” parameter. This allows for much greater artistic freedom.

Translucency shading, that simulates light passing through the water, is also incorporated for every light type. This is a great visual contributor, especially under low sun angles.

Parameteric waves
Waves are now created using an algorithmic method, rather then composed out of heightmap textures. Visually, this means waves can now affect the perceived curvature of the water surface, which in turn translates to lighting features such as reflections.

Another added benefit, is that the same calculations can be mirrored exactly in C#, which opened up the ability to implement buoyancy. The asset now includes a script that can have objects float on the water. Dynamic Water Physics 2 now includes an integration, which allows it to be used with Stylized Water 2.

The shader incorporates integration for third-party fog solutions: EnviroAzure SkyAtmospheric Height FogSC Post Effects. As well as support for Curved World 2020

Improved shader effects

  • Effects such as the color gradient and intersection foam are now completely stable, no matter the camera angle.
  • Water surface can now receive shadows
  • Low-poly/flat shading is added as a feature, making the shader particularly fitting for this kind of aesthetic
  • Caustics projected under the water surface. In the real world, a complex optic effect, but incorporated into the shader as a fast and convincing effect
  • Dedicated river mode, with slope-based foam

Comparison table

FeatureStylized Water ShaderStylized Water 2Note
Render pipelineBuilt-in onlyURP only
Shader authoringAmplify Shader EditorHand-written
Lighting/unlit mode
Orthographic camera’s
Mobile supportSW2 uses a single shader that’s scalable
VR support
Depth-based color
Intersection foamSW2 has more options
Surface foam
RefractionSW1 does not support this on mobile
Normal map
Wave animationSW2 uses procedural waves, SW1 uses heightmaps
UV- or world-space tiling
Planar reflectionsSW2 supports multiple reflections
Skybox reflectionsOnly when using Advanced shading in SW1, tied to “Smoothness” parameter
Sun reflectionsSW2 allows fine control
Vertex color painting
Color gradient textureX
Underwater RenderingXAvailable as a paid extension
Shadow receivingX
Animated causticsX
Translucency shadingX
Buoyancy supportX
Third-party fog supportX
River modeX
Low poly shadingX
Water grid componentX
Water mesh utilityX
Point lightsXSW1 supports up to 3 when using the Advanced shading mode
Spot lightsX
Curved World 2020 supportX

The Stylized Water Shader asset is not slated for deprecation, but has rather reached the end of its life. Bug fixes will still be made when necessary, as well as keeping it functional in future Unity versions.

Leave a Reply

Your email address will not be published. Required fields are marked *