Forum Discussion
tmcsweeney
12 years agoHonored Guest
0.4.3 + DX9 +DirectToRift = 3000ms frames?
I'm going through the process of upgrading our project to 0.4.3, and I encountered an issue where after building the game and running it via DirectToRift I was getting an appalling frame rate (approximately 3 seconds per frame). The same thing happened in an almost empty test project with just the OVR integration imported, and also when I built the Tuscany demo. The downloaded, pre-built Tuscany demo runs fine. This only happens in DirectToRift mode, everything works fine if I use extended mode.
All this is in Unity 4.5.5f1
Shallow profiling reveals that when it is running slowly the game is spending over 3000ms in OVRManager.Update()
After fiddling with settings a bit I narrowed it down to the D3D9/D3D11 toggle. If the game is built in D3D9 mode then it runs incredibly slowly, if it is built in D3D11 mode then it runs smoothly.
I'm kind of cautious about just switching over to D3D11, It is a big project and I'm not sure what other knock-ons there might be (at the very least least time I tried D3D11 in 0.4.2 there was a noticeable performance hit). So I'm curious, should I be able to run in D3D9? or is what I'm seeing known/expected behaviour?
All this is in Unity 4.5.5f1
Shallow profiling reveals that when it is running slowly the game is spending over 3000ms in OVRManager.Update()
After fiddling with settings a bit I narrowed it down to the D3D9/D3D11 toggle. If the game is built in D3D9 mode then it runs incredibly slowly, if it is built in D3D11 mode then it runs smoothly.
I'm kind of cautious about just switching over to D3D11, It is a big project and I'm not sure what other knock-ons there might be (at the very least least time I tried D3D11 in 0.4.2 there was a noticeable performance hit). So I'm curious, should I be able to run in D3D9? or is what I'm seeing known/expected behaviour?
5 Replies
Replies have been turned off for this discussion
- AnonymousI'm having a related fps problem with a few differences. I built and compiled my test environment in dx11, but no matter what I do I cannot get it to run at above 60fps, even in direct to rift mode where it tends to drop down to 30fps for no reason. Thing is it is averaging 90fps at all times according to profiler. It is smooth at 60 in extended mode but would be nice to have 75hz locked down for that additional clarity.
- drashHeroic ExplorerI think I read that extremely slow FPS is due to having Aero off (if you're running Windows 7). Should be a known issue @ Oculus.
"tmcsweeney" wrote:
I'm kind of cautious about just switching over to D3D11, It is a big project and I'm not sure what other knock-ons there might be (at the very least least time I tried D3D11 in 0.4.2 there was a noticeable performance hit). So I'm curious, should I be able to run in D3D9? or is what I'm seeing known/expected behaviour?
As far as I know, "Direct HMD Access from Apps" which requires DX11. In case it wasn't clear, just running the "DirectToRift.exe" doesn't mean you're using Direct mode -- that DirectToRift.exe should be run in both Direct and Extended modes, I believe.
You can always make a copy of your project and switch over to DX11 as a test. I'm not aware of a performance hit -- that's alarming. I haven't seen that on its own, but it could be that by using 0.4.3 + Direct mode you're running into one of the performance problems that have already been reported elsewhere that Oculus is probably working on for the next release. Other than that, the main thing that's going to break going to DX11 are shaders that are taking shortcuts that will then have to be fixed before they will compile. "float4(0.0)" will need to be changed to "float4(0.0, 0.0, 0.0, 0.0)", and you'll need to use explicit swizzles instead of relying on casting types, etc. Minor things like that. - tmcsweeneyHonored Guest
I think I read that extremely slow FPS is due to having Aero off
I am running on Windows 7, I'd already disabled Aero ages ago, and I just rechecked now and it is still off, so that isn't the issue.
Wait... I just re-read that. The issue is having aero OFF? I thought having Aero ON was a problem?
The testing where I noticed a drop in frame rate by switching to DX11 was when I was testing with 0.4.2 trying to fix that horrible timewarp judder, as the vsync behaviour seems to be quite different between DX11 and DX9 it may just have been an artifact of that. Ideally I'd sit down with vsync disabled in both and do a raw performance profile between the two, but as DX9 is hosed at the moment that isn't possible. - cyberealityGrand ChampionAero (desktop composition) needs to be "On". That's probably your problem.
- tmcsweeneyHonored GuestYep sure enough, after turning Aero back on and rebooting everything started working again.
Thanks for the help everyone.
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 26 days ago
- 10 months ago