# Enabling Megalight causes shadow issues when rotating camera

**URL:** <https://forums.unrealengine.com/t/enabling-megalight-causes-shadow-issues-when-rotating-camera/2458292>\
**Category:** Rendering\
**Tags:** unreal-engine, MegaLights, lighting-problem, Lighting, question\
**Created:** [April 15, 2025, 3:38pm UTC](https://forums.unrealengine.com/t/enabling-megalight-causes-shadow-issues-when-rotating-camera/2458292 "2025-04-15T15:38:31Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![DenSevSev](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DenSevSev](https://forums.unrealengine.com/u/DenSevSev)\
**Post date:** [April 15, 2025, 3:38pm UTC](https://forums.unrealengine.com/t/enabling-megalight-causes-shadow-issues-when-rotating-camera/2458292/1 "2025-04-15T15:38:32Z")

</div>

Enabling Megalights to my post process volume causes wierd dark splotches to appear and leak/fade out when rotating and moving the camera. Anyone else have this issue? It only appears in dark/shadowed areas of the scene.

---

<div class="post-metadata">

**Author:** ![CozxEV](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@CozxEV](https://forums.unrealengine.com/u/CozxEV)\
**Post date:** [May 2, 2025, 4:07am UTC](https://forums.unrealengine.com/t/enabling-megalight-causes-shadow-issues-when-rotating-camera/2458292/2 "2025-05-02T04:07:23Z")

</div>

did you manage to solve?

---

<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 2, 2025, 6:02pm UTC](https://forums.unrealengine.com/t/enabling-megalight-causes-shadow-issues-when-rotating-camera/2458292/3 "2025-05-02T18:02:47Z")

</div>

To see what Megalights is doing in that shadow area I recommend following the debugging suggestions in [the doc](https://dev.epicgames.com/documentation/en-us/unreal-engine/megalights-in-unreal-engine?application_version=5.5#lightingcomplexity).

1. Enable **r.MegaLights.Debug 1**
2. Rotate your camera so the issue reproduces and hover your mouse cursor over one of the dark spots. It should list all the lights considered in that area.
3. Run **r.ShaderPrint.Lock 1** to lock the rays to the cursor position so you can fly around and see which lights MegaLights was using, and that can help you track down whether the issue has to do with there being a lot of overlapping lights that never affect the pixel, lights leaking through your ray trace scene and being selected as the most important but always in shadow, or something else.
4. Do the same thing after the issue is resolved to trace to the correct light and see if there`s a difference between the lights chosen when in shadow vs lit

In theory, if you removed/disabled all the lights in the scene except the one that _should_ be used on that wall, you should have no problem with the shadow, so that’s another thing you can test to see if it’s a light selection issue or something else - possibly a ray guiding history issue where the history is being used instead.

---

<div class="post-metadata">

**Author:** ![Manula96](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Manula96](https://forums.unrealengine.com/u/Manula96)\
**Post date:** [May 22, 2025, 10:55am UTC](https://forums.unrealengine.com/t/enabling-megalight-causes-shadow-issues-when-rotating-camera/2458292/4 "2025-05-22T10:55:03Z")

</div>

did you fix this?

---

<div class="post-metadata">

**Author:** ![DBCS](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DBCS](https://forums.unrealengine.com/u/DBCS)\
**Post date:** [June 26, 2025, 9:04am UTC](https://forums.unrealengine.com/t/enabling-megalight-causes-shadow-issues-when-rotating-camera/2458292/5 "2025-06-26T09:04:31Z")

</div>

@DenSevSev - Would love to know if you made progress in understanding what caused this. I’ve been getting similar issues.

---

<div class="post-metadata">

**Author:** ![Arghski](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Arghski](https://forums.unrealengine.com/u/Arghski)\
**Post date:** [March 28, 2026, 12:52am UTC](https://forums.unrealengine.com/t/enabling-megalight-causes-shadow-issues-when-rotating-camera/2458292/6 "2026-03-28T00:52:51Z")

</div>

Solved, as it for what caused it on my end:  
r.MegaLights.GuideByHistory 0

Hopes this saves someone weeks of headache I had while trying to figure this out.
