Forum Discussion
firalt
12 years agoHonored Guest
Is there a perpixel map or formula of the dk2 distortion?
I should be getting my dk2 in soon and from what I understand the current way distortion is being handled is to apply a post process warp to a rendered buffer. I would prefer to take a stab at implementing the warp in my own rendering code, but I would need information like an image or formula of the distortion in some form (like unit vectors centered at each eye's focus). Does anyone have any information?
4 Replies
- cyberealityGrand ChampionWe aren't using pixel shader based distortion anymore. The distortion is created by a mesh, which the SDK supplies. If you use SDK-rendered mode, this is all handled for you. All you have to do is send in your stereo render targets.
- owenwpExpert ProtegeThere is an option for doing the distortion yourself that is explained in the documentation.
- jhericoAdventurerThere's an example of doing client side distortion on my github repository here: https://github.com/OculusRiftInAction/OculusRiftInAction/blob/master/examples/cpp/Example_X_ClientSideDistortion.cpp
The SDK will provide you with a set of vertices which have information about the distortion baked into them. From that you can construct an OpenGL or Direct3D mesh and write a shader which will render the distortion. However, unless you have very specialized needs, it's simpler to let the SDK do the distortion and rendering for you. - firaltHonored GuestNo in this case I wouldn't be letting the sdk do the distortion, my goal is to render based on the distortion rather than to use the distortion as a post-process on a render target (bad for pixel density).
I hadn't read through the documentation yet :oops: , but I'm reading through it now and it's helpful.
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
- 5 months ago