Are the distortion coefficients available for all types of devices? right now, the info is available for cardboard V1 and V2 in the device-info.js class.
Other than that, I had a technical question regarding the code ::
I see that the poly function does the barrel distortion, but what I don't understand is that what exactly happens before and after that. I checked the code and the projection and unprojection vectors are derived from the projection matrices. Is there any link or reading I can refer to you?
Thanks!
Are the distortion coefficients available for all types of devices? right now, the info is available for cardboard V1 and V2 in the device-info.js class.
Other than that, I had a technical question regarding the code ::
vec2 barrel(vec2 v, vec4 projection, vec4 unprojection) {
vec2 w = (v + unprojection.zw) / unprojection.xy;
return projection.xy * (poly(dot(w, w)) * w) - projection.zw;
}
I see that the poly function does the barrel distortion, but what I don't understand is that what exactly happens before and after that. I checked the code and the projection and unprojection vectors are derived from the projection matrices. Is there any link or reading I can refer to you? Thanks!