Stylized Water 3 - Art-focused water shader

Hi! Two quick questions about the underwater extension.

  1. Can it simulate underwater lighting? E.g. If I have a light source coming from like a submarine or something, will it be able to simulate how that would feel underwater?
  2. Can I make it so that the deeper a camera goes underneath the ocean, the darker the water becomes?
    Thanks

The underwater lighting is homogenous, based on the directional light and scene’s ambient light. For localized underwater lighting you’d essentially want lights to also light up the fog itself, but this quickly touches on the realm of volumetric fog, which is out of scope.

A way around this, albeit not perfect, is to create fake-volumetric lights using transparent materials (sphere and cones). I’ve previously prototyped this, and the included Underwater Particle shader is suitable for this. It works well enough, sparing the limitation of them staying visible even in 100% dense fog, but the shader can be expanded with a “distance fade” functionality.


This functionality isn’t part of this asset but I’ve shared a package in a Discord support post. with these two point- and spot light prefabs. The textures and models are actually already included in the asset.

The underwater fog/lighting is mostly based on real-world behaviour, so the fog gets darker the deeper you go and the water surface gets dimmer as you go down as well. Eventually reaching a pitch black void. This is adjustable through the height fog settings, which creates a vertical gradient running from the water surface (start) to the configured depth (end)

Hi there – any chance for the distortion effect to be added in the future? This was, for me at last, the one feature which defined the Underwater renderer. A slight distortion and static seeweed becomes lively. Is this really a feature nobody uses or wants besides me? Thanks and best regards (love Stylized Water anyways, but currently 2 more than 3 :slight_smile:

The distortion effect was indeed not ported over because it introduces a large amount of complexity (custom post processing tacked on). And I didn’t see it used in any games featuring underwater effects either. With any sort of feature I have no usage metrics so estimate wether it’s desired/useful or not.

Adding a feature means it cannot be removed for simplicity later, so I figured I’d see if there is any demand for it first. So your feedback is definitly useful! At the moment there is no intent to add a distortion/blur effect. I’ll keep an eye out for requests for it!

1 Like

Is there any chance of simulating large waves, with all their specific features (barrel, particles, etc.), using the original plugin together with this expansion? It’s for a surf game.

Something like a rolling wave that swells, rolls and breaks is a technical feat of its own, and not something out-of-the-box possible with this asset. It would require 3D displacement support (Dynamic Effects are 2.5D) and modeling a simulated wave in external software and converting it to a usable format. There’s a long standing discussion about it here. Guerilla Games did a GDC presentation on the subject for HZD Forbidden West.

Some fun can definitely be had with waves! But for specific surfing mechanics I don’t see it possible.

1 Like

The examples you shared are great. They could absolutely make for very fun games. Thanks for the discussion link as well; there are some really valuable insights being shared there. I still haven’t found a solution that fully solves the problem, though. I’ll keep researching, but for now I’ll be using Stylized Water 3 for the final rendering.

Extended support for Unity 6.4

The asset now officially supports Unity 6.4. It has been updated to resolve some minor issues.

< link >

Mobile demo

The mobile demo APK has been revived! It’s available for download here.

It now also features a few dynamic effects.

Dynamic Effects extension <link>

Also updated for Unity 6.4

Menu options to quickly spawn any of the included prefab effects are now available under GameObject->Effects->Water

Underwater Rendering extensions <link>

A new feature, to control a lowpass audio filter has been added. This can make environmental audio effects appear muffled when the camera is submerged.

A new documentation section, dedicated to it, has been added here.

Hello,

for some reason installing Enviro 3 cause water to disappear in the demo scene

This is a known issue and attributed to a design limitation in Enviro. Nothing can be done on the water shader’s side unfortunately.

It’ll go paired with a warning message along the lines of d3d12: Fragment Shader "Stylized Water 3/Standard" requires a buffer (SRV) "_EnviroRemovalZones" at index 1, but none provided. Skipping draw calls to avoid crashing.

Which signals the underlying issue: The integration is active, but Enviro isn’t. That “_EnviroRemovalZones” buffer is then not being set up, so the graphics API skips rendering the water completely to avoid a crash.

Ultimately, Enviro’s shader integration can only work with Enviro being active in the scene.

1 Like

Hello,

I am on macOS 26.5.2 and Unity 6.5.
After following the installation steps, the demo scene looks like this:

I also see a warning message in the console

Metal: Vertex or Fragment Shader “Stylized Water 3/Standard” requires a ComputeBuffer at index 5 to be bound, but none provided. Skipping draw calls to avoid crashing.

On a Windows machine, everything works well!

The error likely stems from Enviro’s shader library, since the water doesn’t normally use any Compute Buffers. See post above.

You could resolve this, until this is ever fixed in Enviro, by manually disabling the Enviro fog integration:

Yes, this helped. Thanks! However, why does the same project/demo scene work fine with Enviro 3 on a Windows machine? The console warning error seems specific to Metal/macOS only…

@Vondox Could you please look into this? It’s the most recurring support issue for this asset, but is outside of my control. Any shader including FogIncludeHLSL.hlsl is subjected to this issue because the _EnviroRemovalZones buffer isn’t bound if Enviro isn’t in use. This also applies to the “Enviro3/Particles/…” shaders.

Ideally, if the Enviro instance is disabled or unavailable, the render feature should set the buffer to something empty.

DirectX 11/12 on Windows handles this same situation differently, if a GPU resources isn’t bound it’ll safely handle work around it.

The Metal graphics API (MacOS) on the other hand doesn’t, and requires any resource to be bound to something (even if empty). This is an important thing to account for, since it can causes crashes on MacOS.

Ah! I see it now! This issue only occurs when a project has Enviro 3 installed, but the specific scene (like the Stylized Water 3 Demo scene in this case) doesn’t include an Enviro Manager.

So the solution is either to add an Enviro Manager to the Demo scene or to manually disable the Enviro fog integration, as mentioned here: Stylized Water 3 - Art-focused water shader - #32 by StaggartCreations

So while it’s a bit confusing, it’s not a deal-breaker. All good then, thanks!

It would probably make sense to add this to the troubleshooting section of the documentation for clarity.

1 Like

It seems that when the flow speed is different than zero the reflections got some strange distortions proportional to velocity

This is most likely caused by floating-point precision loss in the UV calculations. It can become noticeable when animation speed is set above 0, as the time-based animation further exacerbates the precision issue over time.

For example, if the River Modeler component uses a UV tiling of 0.01 while the water material uses a counter-tiling of 100, the final result may appear correct, but it requires unnecessary multiplications involving very small and very large values. This can lead to precision loss and visible texture pixellation, especially when animated. This is technically normal behavior and isn’t specific to either asset.

The solution is to make sure the mesh UVs themselves use sensible, normalized values first, rather than compensating for extreme UV values with the material tiling.

Since you’re using River Modeler, you can use the Visualize Mesh dropdown to inspect the generated UVs with a checkerboard pattern. Ideally, the checkers should be roughly 1×1 meter in world space, which provides a sensible scale for typical first- and third-person perspectives. Once the UVs are at a reasonable scale, you can adjust the texture tiling on the water material further if desired.

Out of the box, River Modeler already uses a UV tiling of (1, 1), and the materials included with Stylized Water 3 are also configured with normalized tiling values, so this shouldn’t normally occur with the default setup. A typical workflow involves only modifying the UV on the River Modeler component (between ~0.1 and ~3).

I fixed by reinstalling the Asset. Count understand what was going on.

Now I cant understand why light reflections looks different in my project respect of a new project with just the Asset and Enviro.

Another issue that I noticed is the light reflections moves on the water surface if seen from a certain height.

Reimporting the asset will have reverted any material changes you made, so likely set any tiling values right again :+1:

What you’re seeing with the light reflection is intentional. It’s attributed to the “Distance Normals” feature, which blends in a separate normal map at a lower tiling value in the distance. The normal map in turn affect reflections greatly.

It can be disabled under the Normals section on any water material.

1 Like