Share, , Google Plus, Pinterest,

How to fix the stuttering in Unity-powered games on DK2

Oculus Rift DK2 Cups

So you’ve just loaded a Direct to Rift game such as HELIX Rollercoaster, or CyberSpace on your brand new DK2 headset, but the picture is juddering.

By juddering we mean a slight, constant stutter that’s ever present and really distracting. You’ll see it in any Unity engine-powered game that’s been ported the the Oculus Rift SDK 0.4 and running in Direct X 10 mode or lower.  It turns out a simple properties fix can eliminate the judder and make the picture buttery smooth. Here’s how:

Create a shortcut to the DirectToRift exe version of the game, right click it, select properties, then add -force-d3d11 to the end of the target. It should look something like this:

Force DX 11

Click Apply to save the changes, then run the demo and you should see a perfectly smooth image. Phew!

The fix was discovered by NW-Armon over in the Oculus Sub-Reddit. We’ve tested it on our own PC and it’s made a vast difference to the image quality of the following games:

If you find any other Unity-powered games that improve from this tweak then let us know via the comments area below.

  • Waynosan

    Thanks so much, makes a huge difference in these titles.  BTW, what’s an easy way to tell if the demo/game was written in Unity?

  • deej514

    Waynosan There’s a few ways:

    – There’ll be a <DemoName>_Data folder next to the EXE usually.  
    – For SDK 0.4.0 stuff, there’ll be a <DemoName>_DirectToRift.exe as well as the regular EXE
    – There’ll be files in the archive ending with .assets, such as “sharedassets0.assets”
    – The Unity resolution picker dialog is a good giveaway also (eg- see Ocean Rift).

  • deej514

    Thank you so much for this.  This fixes the issue I was having with my AMD card and the Direct To Rift versions not working at all (not launching / crashing).  You should update the post title to reflect that.  Now I can enjoy Unity stuff without having to set up Extended Desktop mode.  
    Thanks.

  • OrangeCountyVR

    Anyone know how to do the same for OSX?

  • hjmiri

    My target looks like the following, but why is there double quotes? Should we add it before -force-d3d11 and then a blank space?

    C:UsershmiriDesktopWinBuild_DirectToRift.exe -force-d3d11

  • ezzie10

    Waynosan A game written in unity should actually be one of the files you downloaded. When the .zip or .rar folder is extracted, you get all the data folders, the direct to rift extension and most demos I tried also included a .exe file that has the unity logo.
    Hope that helped.

  • AndrewHawkins

    Something else I’ve discovered that causes what looks like a stutter is the reflection probes in Unity.  If you let them run in realtime / all faces at once there is a big lag causing a sticky stutter/judder even when the fix above is applied.  Baking the probes fixes the problem but uses the skydome as the reflection source.  Get a plugin called CubeMapper to generate cube maps where you want your reflection sources to be, set reflection probes to custom and supply the cube maps.  It’s gonna run faster this way anyway 😀