Hi, I have a DXR project which has very good FPS and I would like to try it in Oculus Quest using Link. But when I try to start Oculus, I am forced to switch from DirectX 12 to 11 when raytracing doesn’t work.
“D3D11 is currently the only graphics API compatible with the Oculus XR Plugin on desktop platforms. Please change the preferred Graphics API setting in Player Settings.
UnityEditor.EditorApplication:Internal_PlayModeStateChanged (UnityEditor.PlayModeStateChange)”
Does DXR work for you in virtual reality - and on what hardware?
Just hit the same thing… Raytracing is a DX12 feature (also in Unreal), so I think we’re out of luck for now. I really just want to try it, I don’t think it’s viable, but… you know… I’m willing to suffer through low FPS, blink rapidly and let the brain interpolate…
I have a scene tuned with raytracing with about 90-130 fps which should be enough. I don’t need to have DXR lighting, I only use raytracing for reflection. I can burn shadows / lights the old way but for more complex geometry I need raytraced reflections (self-reflection).
Same here, This Changelog | High Definition RP | 9.0.0-preview.71 said that “Ray tracing support for VR single-pass” but I have no ideas how to work with it, basically DXR needs DX12 and VR is only supported in DX11, correct me if I’m wrong.
I also tried the dev/UpdatedHeaders branch of the OpenVR XR plugin, but it does not work in DX12 either.
I have a Unity 2020.1 alpha project here that works flawless when using DX12 & Ray Tracing in VR. (using the old com.unity.xr.oculus.standalone package, which is no longer supported)
As soon as I try upgrading project to 2020.1 beta or later, I get the following message.
After pressing OK, upgrading the project and using the new XR Plug-in Management, we lose DX12.
So they have deprecated the old working package, while the new one is not yet ready. There’s not a lot you can do right now except manually copying the old package to your /packages/ directory and use the last working editor before it got deprecated (2020.1.0a15), which is almost a year old by now.
Edit
I tried to hack in the legacy package in a modern editor (2020.1, 2020.2, 2021.1) and forcing the XR settings to read only to stop it from updating but no luck. I’m afraid we’re stuck in a broken migration process here.
It does indeed start, but the display/graphics break completely. (and all other VR related assets/packages I tested seem incompatible with OpenXR at the moment)
So we either:
Port modern ray tracing shader code to 2020.1.0a15 and use an optimized acceleration structure manager to compensate for the performance loss that comes with this downgrade, but it will never be on par with 2020.2/2021.1
Find some kind of hack to run legacy XR on 2020.2/2021.1, but you obviously lose future support
Wait for Oculus XR / OpenVR plugins to support DX12, this is the easiest since this is what current projects are built on, however we don’t have confirmation DX12 support will land here in the future
Start over on the OpenXR platform, report all graphics/input related bugs to the team & asset creators, I think this is the best option because OpenXR indeed launches in DX12, but we will have to invest a lot of time to get everything to fit, and it is a bit of a gamble, hoping everyone will adapt to OpenXR in the future.
Edit
I just got OpenXR to work in DX12, using Multi Pass mode. It could be that URP/HDRP actually work in Single Pass Instanced mode, because I am currently still testing on legacy pipeline.
A couple of days ago I tested HDRP through OpenXR in DX12, with DXR and DLSS in Single Pass Instanced mode. I ran this setup on a Oculus Quest 1 (72hz, 1440 x 1600 pixels per eye) running on a PC with a RTX 3080.
With the full ray tracing stack enabled (RTGI/RTR/RTAO/RTSS) and DLSS in Maximum Performance mode it was constantly locked on the Oculus Quest’s 72hz frame limiter, so it is looking promising so far.
There is an issue with RTGI/RTSS that appear to render black after you turn a certain amount of degrees in VR. I have submitted a bug report (Case 1336608). I got an email this morning saying that they successfully reproduced the issue.
If you’d like to optimize this for lower end hardware, you could tweak the effects MIP bias, use a better performing HDRP asset and use half resolution effects and/or combine the minimum smoothness with reflection probes. Optimizing the ray tracing acceleration structure will help too.
For anyone looking to get started with DXR and DLSS in VR, I have created another boilerplate project. I will update this repository once a fix for case 1336608 lands.
Thank you! I installed it and it works, but my pc (TUF RTX3080, ryzen 9 5900x and 16GB of RAM) can only reach 22fps. I’m using oculus rift cv1 with Open XR plugin. My Open XR Runtime is set “system default” (Steam VR in my case). Soorry for my bad english.
Any chance you could try this through the Oculus runtime in OpenXR? Oculus is the runtime I used to test. I wonder if this is related to the selected runtime.
Are you running this in 2021.2.0a17 with DLSS enabled in Maximum Performance mode?
Your PC specs are better than mine so it should run fine, especially because the CV1 uses a lower resolution (1080x1200 pixels per eye) than the Quest 1 I used to test.
A fix for case 1336608 has landed on the Graphics repository about 2 hours ago. It has not yet been merged into master but I’ve pushed it to the hdrp_dxr_dlss_vr repository and can confirm the issue has been fixed. So if you want to start developing a VR game with DLSS & ray tracing you should be good to go.
Edit
Found a remaining issue related to ray traced shadows in XR and added a comment to the PR. I tested the fix for RT shadows locally and can confirm this fixes the issue.
Edit 2
Here’s a bit of an extreme standalone build, which has all of the ray tracing effects, including ray traced shadows.
It still manages to run steady at the 72hz frame limiter on a RTX 3080 / Quest 1.
Edit 3
I’ve pushed the changes (openxr 1.2.0, optimized hdrp asset & support for rt shadows in xr) to the hdrp_dxr_dlss_vr repository.
Edit 4
Video. It could use some denoiser radius tweaks here and there, but it feels like a huge milestone that we’re able to do this now. Let’s hope the [constant deltatime fix]( Time.deltaTime Not Constant: VSync CameraFollow and Jitter page-10) lands on DX12 XR soon.
I get like 36 fps with Oculus on 2080 / Quest 1.
With SteamVR I get like 3fps and lots of crashes, so seems not to be working yet properly.
There seem to be some rendering issues in Global Illumination, and stability is not that good, but overall looks promising! At least for the next generation of GPUs