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

Function glslForwardReference

src/shaders/undistortion.ts:909–920  ·  view source on GitHub ↗
(cls: ProjectionClass, p: Vec2, i: CameraIntrinsics)

Source from the content-addressed store, hash-verified

907 * KEEP IN SYNC WITH THE GLSL ABOVE (undistortionFragmentShader).
908 */
909export function glslForwardReference(cls: ProjectionClass, p: Vec2, i: CameraIntrinsics): Vec2 {
910 switch (cls) {
911 case 'perspective-radial': return _glslFullOpenCV(p, i);
912 case 'fov': return _glslFOV(p, i);
913 case 'fisheye': return _glslThinPrismFisheye(p, i);
914 case 'fisheye-radtan': return _glslRadTanFisheye(p, i);
915 case 'division': return _glslDivision(p, i);
916 case 'eucm': return _glslEUCM(p, i);
917 case 'none':
918 case 'spherical': return { x: p.x, y: p.y };
919 }
920}
921
922// ── Paired TS transcription of GLSL inverseDistort() active paths ──────────────
923// KEEP IN SYNC WITH THE GLSL inverseDistort ABOVE (fullFrameVertexShader). Each

Callers 1

assertParityFunction · 0.90

Calls 6

_glslFullOpenCVFunction · 0.85
_glslFOVFunction · 0.85
_glslThinPrismFisheyeFunction · 0.85
_glslRadTanFisheyeFunction · 0.85
_glslDivisionFunction · 0.85
_glslEUCMFunction · 0.85

Tested by 1

assertParityFunction · 0.72