Forum Discussion
larspensjo
12 years agoHonored Guest
Pincushion distortion transform
The current barrel transform is where As I understand it, you use that to transform the UV coordinates you sample from a bitmap. This works fine for deferred shaders. But how is the ...
larspensjo
12 years agoHonored Guest
"geekmaster" wrote:Funny, I can't explain that. It looks fine to me, as does the link. Maybe the server is up and running again now.
Your embedded images do not work for me (broken links).
Regarding your question, you can find the current implementation in the SDK source code. Look in the fragment pixel shader.But that is the barrel distortion, isn't it?
It is based on the "Brown's model" lens distortion correction formula published at Wikipedia, but without the tangential correction (P) terms needed for lens offset:I see, using a negative K1 gives a pincushion distortion. I just have to find what constants to use.
http://en.wikipedia.org/wiki/Distortion_(optics)#Software_correction
When chromatic aberration correction is used, the formula is applied three times, with slightly different coefficients for each of Red/Green/Blue color planes.I have't got this far yet, and I am not sure it is needed? Well, I had to go and test it with the demo application (OculusWorldDemo). Indeed, there is a distinct color shift at the outer limits of the view field. But I didn't notice until I started to look for it.
There are three pairs of lenses provided. Do they all have the same chromatic aberration?
Thanks for the help!
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 months ago