# Lighting issue with movable skylight & reflection cubemap in VR

**URL:** <https://forums.unrealengine.com/t/lighting-issue-with-movable-skylight-reflection-cubemap-in-vr/392646>\
**Category:** XR Development\
**Tags:** unreal-engine, Lighting, question\
**Created:** [May 4, 2017, 12:11am UTC](https://forums.unrealengine.com/t/lighting-issue-with-movable-skylight-reflection-cubemap-in-vr/392646 "2017-05-04T00:11:19Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_18100073](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_18100073](https://forums.unrealengine.com/u/anonymous_user_18100073)\
**Post date:** [May 4, 2017, 12:11am UTC](https://forums.unrealengine.com/t/lighting-issue-with-movable-skylight-reflection-cubemap-in-vr/392646/1 "2017-05-04T00:11:19Z")

</div>

Description:  
If a movable or stationary skylight is present with a reflection cubemap, all materials with the diffuse color populated gets maxed out brightness and blooms like crazy.

We’ve only tested this on Vive.

Repro steps:  
Make a new project. Add a movable skylight. Set its reflection cubemap. Play in VR.

The floor will be maxed out brightness and bloom like crazy.

---

<div class="post-metadata">

**Author:** ![TahaRizvi](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TahaRizvi](https://forums.unrealengine.com/u/TahaRizvi)\
**Post date:** [May 4, 2017, 7:52am UTC](https://forums.unrealengine.com/t/lighting-issue-with-movable-skylight-reflection-cubemap-in-vr/392646/2 "2017-05-04T07:52:00Z")

</div>

This must be happening due to the reflection cube-map you are using, try using any other map.

Without using cube-map, it works fine on VR

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_18100073](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_18100073](https://forums.unrealengine.com/u/anonymous_user_18100073)\
**Post date:** [May 4, 2017, 4:29pm UTC](https://forums.unrealengine.com/t/lighting-issue-with-movable-skylight-reflection-cubemap-in-vr/392646/3 "2017-05-04T16:29:14Z")

</div>

Right. It only happens with reflection cube maps.

But any reflection cube map – even built-in engine ones – cause this to happen in VR.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_6e7b421a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_6e7b421a](https://forums.unrealengine.com/u/anonymous_user_6e7b421a)\
**Post date:** [May 5, 2017, 9:33pm UTC](https://forums.unrealengine.com/t/lighting-issue-with-movable-skylight-reflection-cubemap-in-vr/392646/4 "2017-05-05T21:33:52Z")

</div>

Hey NathanSculptrVR,

Thanks for the clear repro steps. I was able to confirm what you are reporting and have gone ahead and entered a bug report for the issue. You can track the report following the link below on our public issues tracker.

**[UE-44760](https://issues.unrealengine.com/issue/UE-44760)**

Once the issue has been addressed by our engineers the ticket will be updated and reflected in the public tracker. Let me know if you have further questions or need additional assistance.

Cheers,

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_18100073](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_18100073](https://forums.unrealengine.com/u/anonymous_user_18100073)\
**Post date:** [May 5, 2017, 9:46pm UTC](https://forums.unrealengine.com/t/lighting-issue-with-movable-skylight-reflection-cubemap-in-vr/392646/5 "2017-05-05T21:46:12Z")

</div>

Thanks !

---

<div class="post-metadata">

**Author:** ![TunakTunakun](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TunakTunakun](https://forums.unrealengine.com/u/TunakTunakun)\
**Post date:** [July 4, 2017, 3:37pm UTC](https://forums.unrealengine.com/t/lighting-issue-with-movable-skylight-reflection-cubemap-in-vr/392646/6 "2017-07-04T15:37:38Z")

</div>

Hi ,

I see on the public tracker that the issue has been taken care of, but I am unable to see the fix on github - I suppose that the commit has not been pushed to master yet. Would it be possible to know when it will be available ?

Thanks in advance !

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_18100073](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_18100073](https://forums.unrealengine.com/u/anonymous_user_18100073)\
**Post date:** [July 5, 2017, 6:22pm UTC](https://forums.unrealengine.com/t/lighting-issue-with-movable-skylight-reflection-cubemap-in-vr/392646/7 "2017-07-05T18:22:45Z")

</div>

Someone at Epic shared the fix with me:

in D3D11RHIPrivate.h change:

```
    // Some platforms might want to override this
    virtual void SetScissorRectIfRequiredWhenSettingViewport(uint32 MinX, uint32 MinY, uint32 MaxX, uint32 MaxY) {}

```

to:

```
// Some platforms might want to override this
    virtual void SetScissorRectIfRequiredWhenSettingViewport(uint32 MinX, uint32 MinY, uint32 MaxX, uint32 MaxY)
    {
        RHISetScissorRect(false, 0, 0, 0, 0);
    }

```

This is around line 850 or so.

It worked for us! And thanks to Epic \<3

---

<div class="post-metadata">

**Author:** ![andy\_y](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@andy\_y](https://forums.unrealengine.com/u/andy_y)\
**Post date:** [August 4, 2017, 5:02pm UTC](https://forums.unrealengine.com/t/lighting-issue-with-movable-skylight-reflection-cubemap-in-vr/392646/8 "2017-08-04T17:02:16Z")

</div>

Hi Guys,

I have the same Issue, in 4.15.3 everything works fine, in 4.16.2 everything is white, or glows in neon green…  
I dont know where to replace the code as i am not deep enough into the programming stuff. Will there be an official bugfix, update ? Or can someone tell me if i just have to change some settings in the Details or so?

Thank you!

---

<div class="post-metadata">

**Author:** ![Juss](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Juss](https://forums.unrealengine.com/u/Juss)\
**Post date:** [August 21, 2017, 5:18pm UTC](https://forums.unrealengine.com/t/lighting-issue-with-movable-skylight-reflection-cubemap-in-vr/392646/9 "2017-08-21T17:18:25Z")

</div>

I found the file “D3D11RHIPrivate.h” at (Your drive):\Program Files\UE\_4.16\Engine\Source\Runtime\Windows\D3D11RHI\Private.  
It was read only, so I untick that in the properties, edit using Notepad++ and inserted the exact same line provided above and saved. Then I set it back to ‘read only’.

I re-open my Unreal Engine project but that problem still persist.  
Did I miss something?
