holokit / holokit-1-sdk

HoloKit Unity SDK for HoloKit 1 (Cardboard version). This repo is deprecated. Please refer to https://github.com/holokit/holokit-unity-sdk for latest SDK for HoloKit X.
https://holokit.io
Apache License 2.0
154 stars 58 forks source link

Distortion Correction? #11

Open SunnyVZ777 opened 6 years ago

SunnyVZ777 commented 6 years ago

Because the maths is difficult to deal with. So i decided to buy the official holokit cardboard. And i am using iphone 8 for test.

So far, i feel the depth is correct ,which is good (i bought a third party headset and depth is incorrectly closer than the real thing). However, it has a strong distortion problem in the edge area. So only the position close to the center of view is marching the real world. I see that in the code, holokit v1 model set the distortion correction to zero. And if i manually adjust the distortion, it will break the perspective.

So what should i do?

SunnyVZ777 commented 6 years ago

i modified HoloKit-BarrelDistortion.shader, change "float a = 1.0 + r2 _BarrelDistortionFactor;" to "float a = 1.0 + (1-sqrt(r2)) _BarrelDistortionFactor;". it seems better in my case.