Troubleshooting

Frequently asked questions.

Artifacts

Refraction

When using refraction, you might encounter some artifacts along the edges of objects. This issue was resolved in the 1.0.2 update. Please update to that version.

Mip-maps

Sometimes, you might encounter artifacts along the edges of objects. This may be related to the mip-map settings of your textures. I have experienced this with the caustics texture. To fix the issue, disable the Generate Mip Maps toggle for your texture in the texture import settings.

MSAA

You might also encounter some artifacts on edges when using URP's MSAA. The workaround is to use SMAA or FXAA by enabling it with post processing in your camera settings.

Rendering issues

Particle depth sorting issues

In order for intersection effects to show up around an object, that object needs to have a non-transparent shader so that it can write to the depth buffer, which this shader needs to display intersection effects.

Particle depth sorting issues

Since the mobile shader variant is transparent, you might have some sorting issues since the shader doesn't write to the depth buffer. You can solve this by using a cutout shader for your particles.

You can also set the 'order in layer' option of your particle system to 1 if you want particles to be rendered above the water layer.

Specular lighting fades at a distance

This is caused by the mip mapping settings of your normals texture. You can improve the effect by changing the aniso level in the texture import settings to a higher value. Below on the left you see the effect with an aniso level of 1. On the right you see the effect with an aniso level of 6. You can read more about aniso levels here. A higher aniso level will make your texture look better when viewed at a shallow angle, but comes at a performance cost.

Depth banding

Cause

This shaders uses the depth buffer to render several effects. For the depth buffer to have a high precision, 2 things can help. First, a reversed depth buffer will have a better depth precision than a traditional one. Secondly, a non-linear depth buffer will have a better depth precision than a linear one.

  1. Reversed depth

  2. Non-linear

This means that in situations where these 2 conditions are not met, you might experience some precision issues like depth banding or other artifacts.

SRP 7.4.1

The first thing you should try is updating your SRP version to 7.4.1 through the package manager.

https://forum.unity.com/threads/android-depth-texture-precision-issue.867232/

Orthographic camera

When using an orthographic camera, the depth buffer is linear and so you might encounter precision issues. A solution would be to lower the far clipping plane value of your camera.

OpenGLES

The OpenGLES platform uses a traditional depth direction and so you might encounter precision issues. A solution would be to switch your target graphics API to a more modern API like Vulkan (Android) or Metal (iOS). These more modern APIs use a reversed depth buffer which will increase precision. You can change the target graphics API under Edit > Project Settings > Player > Other Settings > Graphics APIs.

Objects in the demo scene are pink

Before using this asset, you should install the universal render pipeline package from the package manager and assign a render pipeline asset. If you are not using the universal render pipeline, the objects in the demo scene will be pink.

Water looks weird

Water is blurry

When your water colors are set to be transparent, the camera's opaque texture is used (on the desktop variant only). By default, this texture will be down-sampled by the render pipeline. You can change the down-sampling factor in your render pipeline asset settings with the Opaque Downsampling setting.

Water is opaque

This may be caused by the active renderer not generating the necessary opaque texture. Make sure your active renderer is generating an opaque texture. You can always check if the necessary textures are generated by going to Tools > Stylized Water For URP > About and Support and clicking the Detect button in the Configure tab.

Another reason this might be happening is because of fog. More information here.

Water is white

This may be caused by the active renderer not generating the necessary opaque/depth textures. Make sure your active renderer is generating an opaque texture. You can always check if the necessary textures are generated by going to Tools > Stylized Water For URP > About and Support and clicking the Detect button in the Configure tab.

Water is pink

The water material may be pink when the shader refuses to compile. This can sometimes be caused if you move around the shader subgraph files inside of your project. Shader Graph sometimes loses reference to them when you move them around. If you want, you can move around the subgraph files, and then open the shader file to re-instate the references.

Foam

Foam becomes invisible at a distance

This might be happening because the Generate Mip Maps setting was enabled in the texture import settings. You can fix this by disabling the setting.

Planar reflections

Reflections invisible in play mode

This issue was resolved in the 1.0.1 update. Please update to that version.

Waves

Wave movement is choppy in scene view

Fix this by enabling Animated Materials in the scene view.

Waves are rough looking with hard edges

Waves will look better if your surface has a higher vertex density. If the density is too low, the waves will look jagged. Don't increase the density too much though, since this might affect performance.

Console errors

Failed to open source file

Sometimes, Unity messes up things on import. This might happen when updating your SRP version, your Unity version or the asset itself. You can fix this by re-importing the asset. You can do this by right clicking the Stylized Water For URP folder in your project window and clicking Reimport. This will probably fix the errors. Clear the console to check if the errors are gone.

Screen position out of view frustum error

You may get the following error when your camera is zoomed out really far or in some other scenarios.

You can solve this by zooming in. Alternatively you can double-click your water in the hierarchy window. This will make the scene view camera focus on the water object. Another fix might be to close the scene tab and reopen it.

Some fixes were implemented in the 1.0.3 update, but you might still encounter this issue.

VR

Water in right eye looks different than water in the left eye

Due to a bug in the Universal Render Pipeline, the water in your right eye in multi-pass rendering mode might look different. This can be fixed by disabling and re-enabling the depth texture generation in your pipeline asset.

This issue did not occur in single pass instanced mode.

Caustics don't look right

A fix is being worked on.

Material editor

Undo/redo isn't working

This might be because you're using a water prefab. Undo/redo actions will not work when your water is a prefab object. You should unpack it first if you want undo/redo actions to work properly.

Also, if you enter play mode and then make changes to the water and then leave play mode, you can't undo those changes.

3rd Party Integrations

Fast SSAO

Make sure that the Event is set to After Rendering Transparents

Last updated