MCPcopy Create free account
hub / github.com/ColmapView/Colmapview.github.io / _glslEUCM

Function _glslEUCM

src/shaders/undistortion.ts:896–900  ·  view source on GitHub ↗
(p: Vec2, i: CameraIntrinsics)

Source from the content-addressed store, hash-verified

894
895// Mirrors distortEUCM().
896function _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,

Callers 1

glslForwardReferenceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected