# VSM r.Shadow.Virtual.UseReceiverMaskDirectional Breaks Cache Behavior Overrides 

**URL:** <https://forums.unrealengine.com/t/vsm-r-shadow-virtual-usereceivermaskdirectional-breaks-cache-behavior-overrides/2729511>\
**Category:** Rendering\
**Tags:** unreal-engine, Epic-Pro-Support, question\
**Created:** [May 11, 2026, 11:23am UTC](https://forums.unrealengine.com/t/vsm-r-shadow-virtual-usereceivermaskdirectional-breaks-cache-behavior-overrides/2729511 "2026-05-11T11:23:30Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [May 11, 2026, 11:23am UTC](https://forums.unrealengine.com/t/vsm-r-shadow-virtual-usereceivermaskdirectional-breaks-cache-behavior-overrides/2729511/1 "2026-05-11T11:23:30Z")

</div>

Hello, since 5.7 this CVAR has been turned on by default and I’d like to understand why and if it is intentional that it breaks / prevents shadow cache behaviour to be set as we used to in 5.6 on meshes.

r.Shadow.Virtual.UseReceiverMaskDirectional 1

Most of my work is performance related and the VSM cache viewmode has always been a great tool to find issues and reduce shadow costs, but now it can’t be used unless that CVAR is off by default.

I found a forum post that discusses this but it dismisses the issue as by design.

> [@Constant invalidation of VSM dynamic shadows in 5.7.0](https://forums.unrealengine.com/t/constant%5C-invalidation%5C-of%5C-vsm%5C-dynamic%5C-shadows%5C-in%5C-5%5C-7%5C-0/2686534/3):
>
> Hi there. This is the intended default behavior in 5.7. The cause of this forced dynamic invalidation is the r.Shadow.Virtual.UseReceiverMaskDirectional CVar, which now defaults to true in 5.7. If you want to revert to the behavior from 5.6.1, you can disable this CVar. However, this CVar has been enabled due to performance benefits in the most common cases. From the commit description that added this CVar: “When enabled via r.Shadow.Virtual.UseReceiverMaskDirectional, receiver mask will be us…

I have attached a video explaining and showing what 5.7 projects now behave like in detail - I believe this is not the intended design but would really appreciate some clarity on the topic.

Thanks

[VSM\_Issue.mp4](https://forums.unrealengine.com/uploads/short-url/6W9VKDzGwoTCDQpQxGAKgZpQacB.mp4)(58.1 MB)

---

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [May 11, 2026, 11:23am UTC](https://forums.unrealengine.com/t/vsm-r-shadow-virtual-usereceivermaskdirectional-breaks-cache-behavior-overrides/2729511/2 "2026-05-11T11:23:34Z")

</div>

**Steps to Reproduce**  
Open a Vanilla 5.7 project

Check VSM Cache view mode -\> Observe that all dynamic pages are invalidated and the map is entirely blue.

Take an Object with WPO and set its invalidation behavior to be static. -\> Observe shadows continue to move.

Set:

r.Shadow.Virtual.UseReceiverMaskDirectional 0

Observe cache behavior behaves as expected.

---

<div class="post-metadata">

**Author:** ![Petrockets](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/petrockets/32/1142518_2.png) [@Petrockets](https://forums.unrealengine.com/u/Petrockets)\
**Post date:** [May 14, 2026, 3:19pm UTC](https://forums.unrealengine.com/t/vsm-r-shadow-virtual-usereceivermaskdirectional-breaks-cache-behavior-overrides/2729511/3 "2026-05-14T15:19:22Z")

</div>

Hello,

Thanks for reporting this, this could be an unintended regression and it looks like it’s possible to address this behavior by changing VirtualShadowMapPageCacheCommon.ush, but I need to verify with my colleague who is more familiar with this area if the current behavior is intended as you mentioned. They’re currently out of office (national holiday) so I should have more information next week.

```auto
bool ShouldCacheInstanceAsStatic(uint InstanceId, bool bViewUncached, bool bAllowWPO, int SceneRendererPrimaryViewId)
{
	if (bViewUncached)
	{
		return false;
	}
    
	FInstanceSceneData InstanceData = GetInstanceSceneDataUnchecked(InstanceId);
	FPrimitiveSceneData PrimitiveData = GetPrimitiveData(InstanceData.PrimitiveId);
 
	// If WPO is allowed but material invalidations are disabled (Static behavior),
 	// still cache as static to match the intended behavior
	if (bAllowWPO)
	{
		if ((PrimitiveData.Flags & PRIMITIVE_SCENE_DATA_FLAG_DISABLE_MATERIAL_INVALIDATIONS) == 0u)
		{
			return false;
		}
	}

```

---

<div class="post-metadata">

**Author:** ![Petrockets](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/petrockets/32/1142518_2.png) [@Petrockets](https://forums.unrealengine.com/u/Petrockets)\
**Post date:** [May 19, 2026, 4:42pm UTC](https://forums.unrealengine.com/t/vsm-r-shadow-virtual-usereceivermaskdirectional-breaks-cache-behavior-overrides/2729511/4 "2026-05-19T16:42:28Z")

</div>

Quick update: I’ve created [https://issues.unrealengine.com/issue/UE\-380433](https://issues.unrealengine.com/issue/UE%5C-380433) to track this issue and it should be visible publicly soon.

What was happening in the repro project was that the mesh was in the “guard-band” of clipmap levels where it is cached as dynamic such that it doesn’t cause a static invalidation when it starts animating and the logic wasn’t handling the cache as static flag correctly as you noted.

---

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [May 19, 2026, 4:47pm UTC](https://forums.unrealengine.com/t/vsm-r-shadow-virtual-usereceivermaskdirectional-breaks-cache-behavior-overrides/2729511/5 "2026-05-19T16:47:18Z")

</div>

Thanks so much Alex for getting back to me and investigating further ! Glad to hear you were able to find the root cause !
