Forum Discussion
lazydodo
13 years agoHonored Guest
Shader Optimization.
I was playing with the shader and wondered if it could be optimized. Lets start with the standard Shader float2 HmdWarp(float2 in01) { float2 theta = (in01 - LensCenter) * ScaleIn; // ...
gallantpigeon
13 years agoHonored Guest
Correct me if I am wrong, but doesn't the oculus sdk use a Maclaurin series expansion to approximate a full barrel distortion? Wikipedia describes the full expansion: http://en.wikipedia.org/wiki/Distortion_(optics).
Assuming this is correct, we can use more than the 6 terms the sdk uses, r0 = r(k0 + k1r^2 + k2r^4 + k3r^6), to get a higher distortion accuracy since the math operations are only done at start up. I'm not sure if adding more terms will make any noticeable difference in quality, the error may be negligible.
Assuming this is correct, we can use more than the 6 terms the sdk uses, r0 = r(k0 + k1r^2 + k2r^4 + k3r^6), to get a higher distortion accuracy since the math operations are only done at start up. I'm not sure if adding more terms will make any noticeable difference in quality, the error may be negligible.
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
- 1 year ago