# Framerate much lower in packaged build on Oculus for TextureRenderTarget2D for spectator camera

**URL:** <https://forums.unrealengine.com/t/framerate-much-lower-in-packaged-build-on-oculus-for-texturerendertarget2d-for-spectator-camera/444396>\
**Category:** Asset Creation\
**Tags:** package, spectator, unreal-engine, Oculus-Rift, question\
**Created:** [March 1, 2019, 1:19pm UTC](https://forums.unrealengine.com/t/framerate-much-lower-in-packaged-build-on-oculus-for-texturerendertarget2d-for-spectator-camera/444396 "2019-03-01T13:19:19Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_e1d5ba97](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e1d5ba97](https://forums.unrealengine.com/u/anonymous_user_e1d5ba97)\
**Post date:** [March 1, 2019, 1:19pm UTC](https://forums.unrealengine.com/t/framerate-much-lower-in-packaged-build-on-oculus-for-texturerendertarget2d-for-spectator-camera/444396/1 "2019-03-01T13:19:19Z")

</div>

This issue have been reported as UE-70352.

> **[The Unreal Engine Issues and Bug Tracker](https://issues.unrealengine.com/issue/UE-70352)**
>
> Welcome to the Unreal Engine Issue and Bug Tracker. You can check the status of an issue and search for existing bugs. See latest bug fixes too.

Below is a description to reproduce the error as the description on issue tracker is incomplete.

**Description:**

I tried to implement a spectator for my app by using TextureRenderTarget2D and discovered a weird bug.  
Everything works fine in the editor, _BUT_ as soon as I package my project the frame rate drops really low (\<15fps, sometimes less than 5 fps).

This is a bug related to Oculus somehow, because when I try running the packaged project with my HTC Vive everything works as expected.

**Steps to reproduce:**

1. Start a new project with starter content.
2. Check _“Start in VR”_ in project settings.
3. Add a TextureRenderTarget2D to the project, set the size to 1920x1080.
4. Open level blueprint and add the following to _“Begin Play”_ event:

- _“Set spectator screen mode”_ and set it to _“Texture”_

- _“Set spectator screen texture”_ and set it to our TextureRenderTarget2D.

1. Add a _“SceneCapture2D”_ to the project and set its target texture to our TextureRenderTarget2D and its capture  
source to _“Final color”_
2. Package the project

The frame rate will be fine inside the editor. But the frame rate for the packaged project will be very low. It becomes very visible when turning the head from side to side.

The bug have been present since version 4.19 (at least) and is still present in the 4.22 preview version.

---

<div class="post-metadata">

**Author:** ![Bedhead7](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Bedhead7](https://forums.unrealengine.com/u/Bedhead7)\
**Post date:** [July 21, 2019, 2:16am UTC](https://forums.unrealengine.com/t/framerate-much-lower-in-packaged-build-on-oculus-for-texturerendertarget2d-for-spectator-camera/444396/2 "2019-07-21T02:16:48Z")

</div>

I can confirm this bug in 4.22. I am not certain the bug is actually low frame rate though. For me I am achieving 60+fps in a packaged build with a scenecapture2D, but my VR headset will never lock at 45fps with ASW. It’s like the scenecapture2D is preventing the headset from locking the FPS at 45 or 90. I have tried all the smooth frame rate options to no avail. r.vsync 1 also does not fix the issue

---

<div class="post-metadata">

**Author:** ![ndelchen](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ndelchen](https://forums.unrealengine.com/u/ndelchen)\
**Post date:** [September 23, 2019, 2:33pm UTC](https://forums.unrealengine.com/t/framerate-much-lower-in-packaged-build-on-oculus-for-texturerendertarget2d-for-spectator-camera/444396/3 "2019-09-23T14:33:58Z")

</div>

The bug is said to be fixed in 4.23, however, I still have the problems described. Can anyone confirm this?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_e1d5ba97](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e1d5ba97](https://forums.unrealengine.com/u/anonymous_user_e1d5ba97)\
**Post date:** [September 24, 2019, 1:06pm UTC](https://forums.unrealengine.com/t/framerate-much-lower-in-packaged-build-on-oculus-for-texturerendertarget2d-for-spectator-camera/444396/4 "2019-09-24T13:06:04Z")

</div>

@ndelchen I just tried the above procedure with the 4.23 and I can confirm that the bug is still present.

---

<div class="post-metadata">

**Author:** ![ndelchen](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ndelchen](https://forums.unrealengine.com/u/ndelchen)\
**Post date:** [September 24, 2019, 1:32pm UTC](https://forums.unrealengine.com/t/framerate-much-lower-in-packaged-build-on-oculus-for-texturerendertarget2d-for-spectator-camera/444396/5 "2019-09-24T13:32:08Z")

</div>

@anonymous_user_b677394b Bummer ☹

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_e1d5ba97](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e1d5ba97](https://forums.unrealengine.com/u/anonymous_user_e1d5ba97)\
**Post date:** [September 24, 2019, 3:29pm UTC](https://forums.unrealengine.com/t/framerate-much-lower-in-packaged-build-on-oculus-for-texturerendertarget2d-for-spectator-camera/444396/6 "2019-09-24T15:29:51Z")

</div>

I have made a short video demonstrating the issue:

---

<div class="post-metadata">

**Author:** ![ndelchen](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ndelchen](https://forums.unrealengine.com/u/ndelchen)\
**Post date:** [September 24, 2019, 3:35pm UTC](https://forums.unrealengine.com/t/framerate-much-lower-in-packaged-build-on-oculus-for-texturerendertarget2d-for-spectator-camera/444396/7 "2019-09-24T15:35:37Z")

</div>

Exactly the same for me, also with Oculus in 4.23. They might have done their tests using the Vive or so, since the issue tracker doesn’t say anything about Oculus, just VR.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_e1d5ba97](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e1d5ba97](https://forums.unrealengine.com/u/anonymous_user_e1d5ba97)\
**Post date:** [September 30, 2019, 6:55am UTC](https://forums.unrealengine.com/t/framerate-much-lower-in-packaged-build-on-oculus-for-texturerendertarget2d-for-spectator-camera/444396/8 "2019-09-30T06:55:16Z")

</div>

@ndelchen I got a suggestion in another thread about a workaround.

Using the below level blueprint works for me:

 ![288809-unreal-oculus-spectator-hack.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/8/b/f8b5568bc2bb9ca53624142e208c53d47ddef87a.png)

---

<div class="post-metadata">

**Author:** ![ndelchen](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ndelchen](https://forums.unrealengine.com/u/ndelchen)\
**Post date:** [September 30, 2019, 1:40pm UTC](https://forums.unrealengine.com/t/framerate-much-lower-in-packaged-build-on-oculus-for-texturerendertarget2d-for-spectator-camera/444396/9 "2019-09-30T13:40:34Z")

</div>

@anonymous_user_b677394b Looks promising, will test that and let you know! Thx!
