(p: Vec2, i: CameraIntrinsics)
| 894 | |
| 895 | // Mirrors distortEUCM(). |
| 896 | function _glslEUCM(p: Vec2, i: CameraIntrinsics): Vec2 { |
| 897 | const r2 = p.x * p.x + p.y * p.y; |
| 898 | const den = i.alpha * Math.sqrt(i.beta * r2 + 1.0) + (1.0 - i.alpha); |
| 899 | return { x: p.x / den, y: p.y / den }; |
| 900 | } |
| 901 | |
| 902 | /** |
| 903 | * TS transcription of the fragment-shader `applyDistortion()` active path, |
no outgoing calls
no test coverage detected