# Blocky shadows on Single Layer Water

**URL:** <https://forums.unrealengine.com/t/blocky-shadows-on-single-layer-water/1151034>\
**Category:** Rendering\
**Tags:** unreal-engine\
**Created:** [May 1, 2023, 7:14pm UTC](https://forums.unrealengine.com/t/blocky-shadows-on-single-layer-water/1151034 "2023-05-01T19:14:08Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![3DMoss](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@3DMoss](https://forums.unrealengine.com/u/3DMoss)\
**Post date:** [May 1, 2023, 7:14pm UTC](https://forums.unrealengine.com/t/blocky-shadows-on-single-layer-water/1151034/1 "2023-05-01T19:14:08Z")

</div>

This has been an issue forever it seems. Is there any way to fix these blocky shadows on water yet, without resorting to raytracing?

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/c/8/6c802c7c3e787206b40423ffd9370f62c7c8991c.jpeg)

I looks like they fixed it for Fortnite as seen in the video here, but it certainly isn’t fixed in 5.2: [State of Unreal | GDC 2023 | Epic Games - ESRB: RP to M - YouTube](https://youtu.be/teTroOAGZjM?t=14013)

There is a cvar r.Water.SingleLayer.DepthPrepass, but is seems to be read only.

How would I go about getting the water depth prepass to work?

---

<div class="post-metadata">

**Author:** ![Arkiras](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/arkiras/32/1008648_2.png) [@Arkiras](https://forums.unrealengine.com/u/Arkiras)\
**Post date:** [May 1, 2023, 7:57pm UTC](https://forums.unrealengine.com/t/blocky-shadows-on-single-layer-water/1151034/2 "2023-05-01T19:57:37Z")

</div>

> [@3DMoss](#):
>
> There is a cvar r.Water.SingleLayer.DepthPrepass, but is seems to be read only.

Read only cvars need to be changed outside of the editor, ~~probably want to do this in the scalability ini file~~

**Edit** : Looks like it has to be in the engine ini file (best to keep it in your _project’s_ defaultengine.ini file, not the one installed in the Unreal Engine folder itself), it will trigger a full shader recompile, just a warning. I can confirm that the setting does fix the issue though.

---

<div class="post-metadata">

**Author:** ![3DMoss](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@3DMoss](https://forums.unrealengine.com/u/3DMoss)\
**Post date:** [May 1, 2023, 8:16pm UTC](https://forums.unrealengine.com/t/blocky-shadows-on-single-layer-water/1151034/3 "2023-05-01T20:16:54Z")

</div>

Thanks for the help. I was able to change that setting, but not seeing any improvement in shadow quality. Is there any other setting that is needed for this to work?

---

<div class="post-metadata">

**Author:** ![Arkiras](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/arkiras/32/1008648_2.png) [@Arkiras](https://forums.unrealengine.com/u/Arkiras)\
**Post date:** [May 1, 2023, 8:19pm UTC](https://forums.unrealengine.com/t/blocky-shadows-on-single-layer-water/1151034/4 "2023-05-01T20:19:33Z")

</div>

Are you in 5.2 preview?

---

<div class="post-metadata">

**Author:** ![3DMoss](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@3DMoss](https://forums.unrealengine.com/u/3DMoss)\
**Post date:** [May 1, 2023, 8:20pm UTC](https://forums.unrealengine.com/t/blocky-shadows-on-single-layer-water/1151034/5 "2023-05-01T20:20:01Z")

</div>

Yes, 5.2 preview.

---

<div class="post-metadata">

**Author:** ![Arkiras](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/arkiras/32/1008648_2.png) [@Arkiras](https://forums.unrealengine.com/u/Arkiras)\
**Post date:** [May 1, 2023, 8:23pm UTC](https://forums.unrealengine.com/t/blocky-shadows-on-single-layer-water/1151034/6 "2023-05-01T20:23:03Z")

</div>

Where did you put the cvar? And what exactly did you put?

All I did was add: `r.Water.SingleLayer.DepthPrepass=1`

to DefaultEngine.ini in my project folder, in the Render Settings category.

[https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/9/c/29cdc096f40f4d1cd29e83c219de2a24e624eab2.mp4](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/9/c/29cdc096f40f4d1cd29e83c219de2a24e624eab2.mp4)

I really feel like this should just be a checkbox in the project settings. Having a setting this important be an offline cvar seems silly tbh

---

<div class="post-metadata">

**Author:** ![3DMoss](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@3DMoss](https://forums.unrealengine.com/u/3DMoss)\
**Post date:** [May 1, 2023, 8:42pm UTC](https://forums.unrealengine.com/t/blocky-shadows-on-single-layer-water/1151034/7 "2023-05-01T20:42:13Z")

</div>

Tried testing it in a new project, still no luck. The renderer settings in a new project seems far less than in your example, so I wonder if another setting needs to be enabled for this to work.

This is what mine looks like in a fresh project (with the added setting):

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/6/d/96d0cee89c601bd944edc2e4b75b6b36ea8a7b13.png)

Nice to see it is working in your project though. Are you on 5.2.0 preview 2?

---

<div class="post-metadata">

**Author:** ![Arkiras](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/arkiras/32/1008648_2.png) [@Arkiras](https://forums.unrealengine.com/u/Arkiras)\
**Post date:** [May 1, 2023, 9:02pm UTC](https://forums.unrealengine.com/t/blocky-shadows-on-single-layer-water/1151034/8 "2023-05-01T21:02:57Z")

</div>

> [@3DMoss](#):
>
> The renderer settings in a new project seems far less than in your example, so I wonder if another setting needs to be enabled for this to work.

I just built a new project from scratch, same as yours are enabled. Works fine for me…

> [@3DMoss](#):
>
> Nice to see it is working in your project though. Are you on 5.2.0 preview 2?

Yes, 5.2p2. Honestly no idea what the issue could be.

When you added the setting to your ini file did it recompile all the shaders in the project?

---

<div class="post-metadata">

**Author:** ![3DMoss](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@3DMoss](https://forums.unrealengine.com/u/3DMoss)\
**Post date:** [May 1, 2023, 9:06pm UTC](https://forums.unrealengine.com/t/blocky-shadows-on-single-layer-water/1151034/9 "2023-05-01T21:06:11Z")

</div>

Yes, it did recompile shaders. I’m going to test on some other systems, maybe it is hardware/driver related.

---

<div class="post-metadata">

**Author:** ![Arkiras](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/arkiras/32/1008648_2.png) [@Arkiras](https://forums.unrealengine.com/u/Arkiras)\
**Post date:** [May 1, 2023, 9:09pm UTC](https://forums.unrealengine.com/t/blocky-shadows-on-single-layer-water/1151034/10 "2023-05-01T21:09:39Z")

</div>

Honestly the only other thing I could think is that you’re not using the SingleLayerWater shading model for your water. That cvar only works on single layer water materials.

---

<div class="post-metadata">

**Author:** ![3DMoss](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@3DMoss](https://forums.unrealengine.com/u/3DMoss)\
**Post date:** [May 1, 2023, 9:51pm UTC](https://forums.unrealengine.com/t/blocky-shadows-on-single-layer-water/1151034/11 "2023-05-01T21:51:06Z")

</div>

OK, I figured it out. I noticed with r.Water.SingleLayer.DepthPrepass=1 while the shadows were still blocky, the blocks would get smaller when you zoom into them. So in searching for other settings I found r.Water.SingleLayer.ShadersSupportVSMFiltering and r.Water.SingleLayer.VSMFiltering.

Adding all 3 the DefaultEngine.ini like so:

r.Water.SingleLayer.DepthPrepass=1  
r.Water.SingleLayer.ShadersSupportVSMFiltering=1  
r.Water.SingleLayer.VSMFiltering=1

Gives you nice soft virtual shadows on water:

 ![water](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/9/5/a953811ae891ea7cf56a3b1cc16a06bc98104b60.jpeg)

Thanks for the help with this!

---

<div class="post-metadata">

**Author:** ![Jordan\_Ariel](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Jordan\_Ariel](https://forums.unrealengine.com/u/Jordan_Ariel)\
**Post date:** [July 26, 2023, 5:15am UTC](https://forums.unrealengine.com/t/blocky-shadows-on-single-layer-water/1151034/13 "2023-07-26T05:15:23Z")

</div>

@3DMoss oh my god thank you! I was having this same issue for a while now, and randmly started digging through some single layer water cvars as well and googled them to come across this posting. This is the only thing I have ever seen about these documented anywhere. thanks a million!

---

<div class="post-metadata">

**Author:** ![BetaDeltaEl](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@BetaDeltaEl](https://forums.unrealengine.com/u/BetaDeltaEl)\
**Post date:** [November 20, 2023, 11:28am UTC](https://forums.unrealengine.com/t/blocky-shadows-on-single-layer-water/1151034/14 "2023-11-20T11:28:39Z")

</div>

Does this not work when applied from command line? I have tried with the above cvars from command line, but the hard edges seem to not go away at all.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/8/7/9870784a566676f6903d20a7232bafaaa6b93d4f.jpeg)

---

<div class="post-metadata">

**Author:** ![kuriboh\_pu](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/kuriboh_pu/32/1108550_2.png) [@kuriboh\_pu](https://forums.unrealengine.com/u/kuriboh_pu)\
**Post date:** [April 9, 2024, 6:36pm UTC](https://forums.unrealengine.com/t/blocky-shadows-on-single-layer-water/1151034/15 "2024-04-09T18:36:41Z")

</div>

thank you so much! Same issue and this works for me! 太感谢了

---

<div class="post-metadata">

**Author:** ![kuriboh\_pu](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/kuriboh_pu/32/1108550_2.png) [@kuriboh\_pu](https://forums.unrealengine.com/u/kuriboh_pu)\
**Post date:** [April 9, 2024, 6:42pm UTC](https://forums.unrealengine.com/t/blocky-shadows-on-single-layer-water/1151034/16 "2024-04-09T18:42:33Z")

</div>

Yes, you need to edit in DefaultEngine.ini

---

<div class="post-metadata">

**Author:** ![AssemblerJohn](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/assemblerjohn/32/921539_2.png) [@AssemblerJohn](https://forums.unrealengine.com/u/AssemblerJohn)\
**Post date:** [September 18, 2025, 10:21am UTC](https://forums.unrealengine.com/t/blocky-shadows-on-single-layer-water/1151034/17 "2025-09-18T10:21:11Z")

</div>

I’ve opened a new topic here to properly resolve the issue without using VSM shadows, anisotropy or other techniques that might not work: [Prevent Mesh/Ocean/Water (Single Water Layer) From Receiving Shadows](https://forums.unrealengine.com/t/prevent-mesh-ocean-water-single-water-layer-from-receiving-shadows/2657878)
