Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
molton's avatar
molton
Explorer
11 years ago

Trouble using Direct-to-Rift in DirectX 9 with 0.4.3 SDK

Hello, I can build my application in Unity in DirectX9 and it works in Extended mode, but in direct mode I just get a black screen, although the application is running, I just can't see anything. I can fix this problem by changing my project to DirectX 11 but I don't want to do that for various reasons. Has anyone else had luck with direct-to-rift and DirectX 9? I noticed in my Unity project settings-player settings tab that DirectX 9 has an exclusive fullscreen mode and a Windowed Full screen mode, I can't get the project to stay on Windowed fullscreen mode though, it always switches to exclusive, I'm wondering if that has anything to do with my Direct-to-rift-0.43 SDK-DirectX 9 problems.

Any input on this is greatly appreciated.

7 Replies

Replies have been turned off for this discussion
  • Proton's avatar
    Proton
    Honored Guest
    OVRShimLoader.cs has the following line:
    PlayerSettings.d3d9FullscreenMode = D3D9FullscreenMode.ExclusiveMode;

    So that's why you can't get it to stay. You could try commenting it out if you just want to test. Also try disabling all image effects just to rule them out. Turn 'Use Player Log' on incase there are any errors happening in the build that don't happen in the editor (log file is in <APPNAME>_Data\output_log.txt).
  • Anonymous's avatar
    Anonymous
    I haven't tested the 0.4.3 SDK yet but you can force dx11 as a unity commandline in the build .exe itself on 0.4.2 and below.

    To do this create a shortcut of the direct to rift exe. When you right click/ properties on the shortcut add in the Target slot after exe :

    -force-d3d11 (also make sure to have a space between exe and this command).

    This will force the exe to run with dx11. You can then keep building to the same location and run the shortcut with the commandline. If you are comfortable with .bat files you can create one instead with the same commandline which is a bit cleaner.

    Hope that helps.

    cheers
    Matt
  • Thanks but the exclusive / window mode thing didn't make a difference and I turned image effects off and using the -force-d3d11 switch does force d3d11, but thats the same as selecting d3d11 in the project, getting direct-to-rift to work in d3d9 is what I wanted to do but I'm not sure if it's possible in 0.4.3 sdk builds Anybody on here using DirectX9 in direct-to-rift with the 0.4.3 sdk successfully?
  • D3D9 works in direct mode on my machines. What Unity version, GPU, and Windows version are you using?
  • Im using Unity 4.6 beta 18 in Windows 7 service pack 1. I got an AMD Radeon HD5770 and I'm running the Catalyst 14.4 drivers although I originally tried it on Catalyst 13.4 and then catalyst 14.9 with about the same results. I tried to upgrade to the Unity 5 beta and test how that worked in this regard but Unity 5 failed to import my project, and I guess I can't really go back to Unity 4.5.5 at this point. I get the standard APPCRASH / ntdll.dll errors when I try to run direct-to-rift in DirectX9
  • b18 is pretty old by now, easiest thing to try would be to upgrade to the latest b21 which also has tons of other important fixes compared to b18 and see if that makes any difference?
  • Thanks virror, I figured since 4.6 beta 18 was kind of old that Unity 4.5.5 might work for me and it did, but I still get the same direct-to-rift DirectX9 problems. Although I'm not sure if it's a big deal anymore because I noticed that my DirectX9 performance is also very poor with the new 0.4.3 Oculus Rift Unity integration, but Directx9 support would be great just for compatibility with older video cards so I haven't given up on getting it to work yet. I attached a Tuscany scene build I made in Unity 4.5.5 with directx9 support, I can get it to work in extended mode but not in direct HMD access mode, it just gives me a blank screen. If anybody has a minute and could test this build in direct access direct-to-rift mode and see if it shows up or not I'd appreciate that. Please don't try to test it with the -force-d3d11 switch, I want to know if the DirectX9 is working for you. Thanks

    edit: couldn't get it to attach to the post, so here's a link
    http://trashdragongames.com/tuscany_dx9-0.4.3_sdk_test.zip