Stylized Water 3 – Documentation

Stylized Water 3

Stylized Water 3
Version: 3.0.0
Review

2.Compatibility #

Unity

Version

Non-LTS versions are not supported, for example Unity 2023.2.

 

Unity version URP Version Status
2023.2 16.0.0 Incompatible
Unity <6000.0.14f 17.0.0 Incompatible
Unity 6000.0.15f+ 17.0.3 Supported
Unity 7 Not supported

Please keep in mind that extensions asset (Underwater Rendering & Dynamic Effects) for Stylized Water 2 will not work with Stylized Water 3.

Render Graph compatibility mode must be disabled

Beta and Alpha versions may work but will not be eligible for support or fixes. These versions are intended for beta and alpha testing Unity features. Once a release version is available, the asset will be re-tested, and an update may follow with any required changes or fixes.

Scriptable Render Pipeline

Pipeline Compatible
Built-in (Legacy)
Universal (URP)
High-Definition (HDRP)

Only compatible with the Universal Render Pipeline. Support for other render pipelines unfortunately cannot simply be added, since this practically requires a complete rewrite of scripts and shaders, resulting in a new asset altogether.

Changes to the URP shader libraries and rendering API are undocumented and come without usage instructions. This means preview versions can break the shader or scripting code.

This takes time to manually reverse engineer. Sometimes pre-emptive fixes are made for beta/alpha versions, but these may break in earlier or later alpha versions.

Support for the “Unified Renderer”, in combination with a conversion to the Shader Blocks system will be available in the future through a paid upgrade (likely Unity 7).

URP

  • Materials that use Tessellation while URP’s “GPU Resident Drawer” is enabled will not render correctly. URP does not officially support tessellation.
  • When using Forward+ rendering, lights don’t appear to affect the water anymore after a certain distance. A known issue, for which a solution is not yet known.

Platforms

Compatibility with platforms is mostly dictated by what Unity and URP supports on said platforms.

Name Compatible
Windows
macOS
WebGL 1.0
WebGL 2.0 ⚠️
WebGPU
Android
iOS
Apple Vision Pro

WebGL does not support compute shaders or texture arrays. This makes the GPU-readback method of the Water Height Query system unavailable. Instead, consider using WebGPU.

Hardware Compatible
Oculus Quest
Desktop VR
tvOS ⚠️
Google TV ⚠️

The Multi-pass, Multiview and Single Pass Instanced rendering techniques are all supported and work the same across all VR plugins. As a means of performance optimization, orthographic camera’s are not supported when VR is in use.

Graphics API Compatible
OpenGLES 2.0
OpenGLES 3.0+
Vulkan
Metal

Devices released after 2012 support OpenGLES 3.0. Or typically an iPhone 6s or newer.

Oculus Desktop VR
Tested using an Oculus Rift S with the Oculus XR plugin. The Multi-pass, Multiview and Single Pass Instanced rendering techniques are all supported and work the same across all VR plugins. As a means of optimization, orthographic camera’s are not supported when VR is in use.

  • The “Shared depth buffer” option must be disabled in the Oculus XR settings, otherwise the water effects appear to lag behind the headset movement.
  • Planar reflections are not supported, reflection probes and screen-space reflections work as expected.

Meta Quest 2/3

Tested using an Oculus Quest 3 with the Oculus XR plugin.

  • Multiview rendering must be used, otherwise the water effects appear to lag behind the headset movement (issue with how the depth texture is rendered).
  • Using the Vulkan rendering API is highly recommended.
  • Planar reflections are not supported, reflection probes and screen-space reflections work as expected.

There’s a bug in OpenGLES 3.0 which severely affects transparent materials on Quest. When MSAA is enabled, they will either appear invisible or show blocky artefacts, depending if post processing is enabled or not. This means MSAA with transparent materials (such as water) aren’t supported on Quest.

As a rule of thumb: If a simple transparent plane works in your project, the water will also render correctly.

  • Any reference to mobile platforms in the documentation also applies to Quest.
  • Planar reflections are not supported, reflection probes and screen-space reflections work as expected.

Oculus Go and Gear VR are considered obsolete, and are no longer being tested on. Though they practically work the same as Quest, rendering-wise.

Apple Vision Pro

The Unity documentation states:

ShaderLab and other custom coded shaders are not supported, as RealityKit for visionOS doesn’t expose a low-level shading language.

Therefor the water shader is also not supported on this platform.

WebGL

WebGL 2.0 is compatible since it uses the OpenGL 3.0 rendering API just like Android/iOS does. WebGL 1.0 is not compatible and should be removed as a Graphics API in the Player settings.

MacOS
Compatible with both OpenGL 4.1 and Metal.

In Unity 2022.3.15-35 a critical shader error will be present, hence this version range is incompatible due to a Unity bug.

tvOS remains untested, though it also uses the Metal graphics API, so there’s a slim chance this will pose any specific issues.

Mobile

Android uses either the OpenGL 3.0+ or Vulkan graphics API, whilst iOS uses Metal. So these are both inherently supported.

The shader is generally optimized, and uses a few principles that also aid performance sensitive hardware. Depending on the device and complexity of the project, it will depend if every feature on the shader can be enabled whilst maintaining proper framerates. See the Performance Guidelines page for more details. Expecting desktop-level graphics on mobile is unfortunately not realistic.

  • The water will not turn pixelated the longer the application runs, as is the case with other water shaders. Though this may slowly start to occur after ~6+ hours due to the limited precision of mobile hardware.
  • Google TV is not supported, given that URP graphics don’t fully work on the platform to begin with.

Rendering large distances on mobile hardware has its challenges. This is not specific to this water asset, but it can be affected by it. See the Troubleshooting section for more details.

Whilst this asset is mobile-compatible, and quality can be scaled down to meet performance critical demand. None of the demo content is set up to be deployed to mobile hardware. This simply isn’t possible, as project-wide settings would need to be tuned as well, which only you have control over.

Consoles

No graphical or platform-specific issues were encountered.

Platform Compatible
Playstation 5 Verified by users
Xbox Series X Tested with UWP build
Nintendo Switch Tested with EDEV hardware
Playstation 4 Tested via external party
Xbox One X Tested with UWP build

Shader runs without any issues on Nintendo Switch. With all features enabled, the shader does not incur a noticeable performance hit (also in handheld mode). Though this may vary per project. Any references to mobile devices in the documentation should also apply to it.

Playstation 5 remains untested, due to lack of development hardware. Though I don’t suspect there will be any specific issues. Should you run into any, please contact me, as I’d be happy to investigate

Other assets

Fog post processing effects
See this page for a list of compatible assets.

Typically, any third-party fog/volumetric lighting solutions will ignore the water. Or shade the water surface with fog, based on what’s behind it (barely noticeable for shallow water). This behavior applies to all transparent materials, since they do not write to the depth texture these effects rely on.

Asset name Compatible
Azure*
Atmospheric Height Fog v3.2.0+
Buto
Enviro 2*
Enviro 3*
Cozy 1
Cozy 2
Cozy 3
SC Post Effects
UniStorm
Weather Maker
Massive Clouds
Altos

* Does not support rendering its fog into a Planar Reflections render due to the use of custom projection matrices.

If an asset is not listed here, please get in touch so that I can investigate if an integration is possible.

Some assets have a closed code structure for fog shading, as opposed to exposing a re-usable code function for applying fog to a surface. In C# terms, this is comparable to not having a public and abstract API. Thus these asset can’t be integrated into any other shader, unless made possible by the author.

Buoyancy physics systems

Type Compatible
Dynamic Water Physics 2

At this time, the DWP2 asset does not contain an integration for Stylized Water 3’s Water Height Query API. Facilitating this is at the author’s discretion.

Use cases

Camera’s

Type Compatible
Perspective
Orthographic
Overlay
  • Rendering the water on an Overlay camera is not possible, due to limitations imposed by URP’s camera stacking system.
  • Geometry draw on overlay cameras are virtually invisible to the water. As such, depth-based effects (fog, caustics, refraction, SSR) will not render properly.
  • Overlay geometry will cause artifacts when refraction is enabled on the water material, since they’re rendered after the water. A setup using the Render Objects feature otherwise works perfectly.

Features

Tessellation
May not appear to have any effect when using an incompatible graphics API or GPU (not supporting Shader Model 4.6+). In this case it is automatically disabled, so it can be enabled without worrying about a pink material on some devices.

Tessellation cannot work with waves if GPU Instancing is enabled on the water material, due to a limitation of Unity’s rendering architecture.

Yes No Suggest edit
Last updated on October 13, 2024
0 of 0 users found this section helpful
Suggest Edit