Forum Discussion
mattnewport
8 years agoProtege
Lens distortion model for DirectX raytracing based rendering?
I'm interested in experimenting with VR rendering using DirectX raytracing where the Rift lens distortion could be directly corrected in the ray generation shader rather than rendering an undistorted...
thewhiteambit
8 years agoAdventurer
I did it like that: Give the Oculus API only a Red-Green* UV mapped texture, then grab it from the mirroring viewport while head is steady. Voila, you have the distortion values for your raytracer.
Still the Timewarp is a hard to workaround when not desired and will give you undesired jitter. This is because many parts of the OVR-API are really stupid designed, but I gave up explaining that to oculus.
*) you should also set blue channel to 1.0 to have a reference on the outer areas where they are gradually shaded. since chromatic aberration correction will distort red and green differently, you can do it multiple times with rotated colors to acquire the shift introduced by aberration correction also. but I hope you got the idea. I spent to much time creating workarounds for a mediocre API...
Still the Timewarp is a hard to workaround when not desired and will give you undesired jitter. This is because many parts of the OVR-API are really stupid designed, but I gave up explaining that to oculus.
*) you should also set blue channel to 1.0 to have a reference on the outer areas where they are gradually shaded. since chromatic aberration correction will distort red and green differently, you can do it multiple times with rotated colors to acquire the shift introduced by aberration correction also. but I hope you got the idea. I spent to much time creating workarounds for a mediocre API...
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
- 2 years ago
- 6 months ago
- 3 years ago