Stylized Water Shader - Desktop/Mobile/VR [Built-in RP]

This asset was originally released back in 2016, and has seen a number of free updates, including a major revamp in 2018. It is no longer under active development, since new features would set in motion a structural rework (which is what Stylized Water 2 amounted to).

However, it is subject to minor fixes/updates required to keep it working in its supported range of Unity versions.

[Asset store] [Documentation]
[Video] [APK Demo] [Rate/Review]

Highly customizable to suit your art direction through various parameters. This package focuses on providing artistic freedom, rather than a realistic water simulation.

NEW Version 2.0!
• 3 new demo scenes
• Revamped desktop shader
• 4 water VFX assets
• New mobile shader (up to 37% faster)
• Orthographic camera support
• Lighting modes (Unlit/Basic/Advanced)
• Shadow transmission
• Vertex painting support
• Water particle effects
• UX improvements
• Reflection blurring
• Tiling reduction (Desktop)
• Color gradient feature
• Improved wave animations (Desktop)
• Custom heightmap option

Read all about the update here

The style can be customized through a set of built-in textures, as well as by adding your own. These are automatically packed into channels, making this package customizable and lightweight.

Also includes a mobile shader, features can be disabled to suit your performance target. Effects also feature an optimized mobile shader. Minimum requirement is OpenGL ES 3.0.

== Colors ==
The water can be colored from shallow to deep through color fields, or through an integrated gradient editor.

The material reacts to lighting conditions accordingly. Supports GI and Reflection Probes.

== Intersection ==
Objects intersecting with the water, such as shores and rocks automatically receive a foam effect. Features several techniques for achieving this effect, more details in documentation

== Mask rendering ==
Intersection and opacity can be denoted through the use of volumes, or dedicated meshes.

Features:
• Custom inspector, intuitive design
• Intersection effect with other objects
• Surface foam
• Orthographic camera support
• Advanced and Simple lighting modes
• Refraction (Desktop only)
• Planar reflections with blurring (Desktop only, excl VR)
• Shadow transmission from Directional Light
• Shallow wave animation (GPU)
• 8 built-in normal maps
• 7 built-in intersection textures
• 5 built-in wave heightmaps
• UV-based tiling or World-space (endless water)

Contents:
• Island, lake and pond example scenes
• Desktop shader
• Mobile shader
• 4 matching water particle effects (splashes and circles) including shader.

WARNING! Does not support:
• Buoyancy
• Lab Renderer
• Reflections in VR (SPR)
• Spherical water
• Scriptable Render Pipeline

As seen in:
• The Trail
• Shotgun Farmers
• Re:Legend

Would you like me to see where you’re using it? Submit a game for the porfolio!

Feature requests:

  • Waves heightmap
  • Flow direction
  • Skybox lighting
  • Orthographic camera support
  • Realtime reflections
  • Filter objects subject to intersection effect
6 Likes

Nice! 3 queries (priority order):

  • Artificial surface highlight based on wave (to mimic specular reflections)
  • Caustics (on underwater objects)
  • Underwater effect?

Good call! Although I think the last two points would be outside of the scope of this project. To my understanding people usually achieve caustics through the use of Projectors and an underwater camera effect through a camera shader.

I’d like to add the ability to use the intersection texture on the surface as well, but tiled larger, much like in Windwaker. It warrants some experimentation :slight_smile:

It looks really nice! Can you provide web or apk demo for testing?

Will do! My idea would be to expose the shader parameters in a UI, so you can try out all the things :wink:

Now available! Unity Asset Store - The Best Assets for Game Making

1 Like

Upcoming update (v1.1) will add surface highlight detail. Size and transparency are adjustable.

3 Likes

Just wanted to let you know this gif sold me on the asset. I’m getting it now and I look forward to this update. Thank you for sharing your work.

1 Like

If anyone is experiencing issues with Unity 5.5, some underlying shader changes were made, which prevents this shader from compiling.

However, I have a fixed version. If you’re set on using 5.5 and you’d like to use this shader in your project please contact me with your invoice number and I’ll sort it out for you!

The manual fix for compatibility with 5.5 will be included in the next manual update. Unfortunately, It’s pretty difficult to ensure compatibility with different versions of Unity, I’m currently looking for the lowest possible version it’s compatible with, since not everyone is on 5.4 yet.

Received some important feedback from several users, aiming to submit version 1.15 this week!

Added:

  • Fresnel control
  • Multi-light support
  • Rim color alpha now controls intersection amount
  • Support for Unity 5.3.0 and up.

Removed:

Changed:

  • Fresnel color is now derived from Ambient Light rather than Directional Light
  • UV/WorldSpace tiling values are more logical
  • Reflection intensity is now bound to the glossiness parameter
  • Shadermap is now assigned by default
    when resetting the shader
  • Depth control is more physically correct

New demo image:

Shader as seen in ā€œThe Night’s Willowā€

2 Likes

Hi Jonathan, I just wanna say that you’ve done a great job with this water. It’s a great new to see that you’re still supporting and improve it with those new features and control options.

I’m working in a personal project and I’m pretty confident that your water will be the one that I’ll use in it.

Keep working hard!!

Thank you for your kind words! I appreciate it :slight_smile:

In the next update I’m aiming to add a custom inspector, so all the shader and substance parameters are in one place, and neatly organized. This update will introduce a slight price increase, because of the time investment and the added functionality.

I noticed I accidentally included my work-in-progress script for this in the last version. So all I can ask now is: please ignore it :>

Hey Jonny, I recently bought this shader and I’ve been using it for a project I’ve got going. It fits really well, love it, great job! :slight_smile:

Custom inspector sounds really cool as well, looking forward to it!

I’ve got one question/request. I have day/night cycle going and I make small real time changes to some of the properties to make the water fit better, but there’s this grey gradient effect ( fresnel ? ) that I can’t seem to change at all, pictured in the image below. Is there any chance you can expose the controls of it as a property, so I can either remove the effect during night or change the color of it?

Hi,

Please send me an email (contact info is on the asset store page) and I’ll fix you a modified shader with the fresnel color exposed (currently linked to the scene ambient color). I’ll include the fresnel color in the next update, where the alpha channel will control its opacity.

1 Like

A price increase is totally fair man, the new update sounds very interesting!

Making good progress on the custom inspector. Right now the undo function is too wonky for comfort :roll_eyes:

I’ve also added a toggle which allows you to use the intersection texture type (either the built-in or a custom provided map) as the surface highlight. When switched off this is derived from the normal map.

Did some experimenting with animating Substances, to see if I could move some of the texture cross-panning out of the shader. Which seems to be a huge performance bottleneck on mobile.

https://gfycat.com/TepidShrillCrayfish

The result is visually identical, but yields a 300% performance boost on mobile (tested with Oneplus One). Another benefit is that I can now utilize all of Substance’s functionality to replace certain shader operations.

If you’re interested in giving it a spin, contact me with your invoice number and I’ll sent it out as soon as I’ve ironed out the kinks :wink: Feedback is much appreciated at this point!

Hey there, awesome stuff with this water shader… I’m about to buy it but wanted to ask if you could share some vertical examples using this shaders, luje waterfakks as well as using this very shader on a sphere or other surface that it is not 100% flat.

If you’re worried about stretching, you can toggle world-space tiling

1 Like

Version 1.2 has been submitted for review! Documentation is now available online, as is an Android APK demo. Links are in the first post.

Added:

  • Custom inspector component for ease of use
  • Fresnel color (alpha controls opacity)
  • New mobile shader variant ā€œBasicā€
  • Documentation now contains a parameter glossary

Changed:

  • Previous mobile shader is now called ā€œMobile Advancedā€
  • Updated demo scene
  • Set Substance to ā€˜Uncompressed’ for Desktop
  • Mobile shader has been tweaked for performance