IT lexicon › Programming › Möller–Trumbore

Möller–Trumbore

Programming På svenska → Updated: 2026-10-27

The standard ray–triangle intersection test, which finds the hit without ever computing the triangle's plane.

The textbook approach takes two steps: intersect the ray with the triangle's plane, then check whether the hit point falls inside all three edges. Tomas Möller and Ben Trumbore showed in 1997 that the plane is unnecessary. Write the ray as an origin plus a direction, the triangle as a vertex plus two edge vectors, and solve the resulting system with Cramer's rule — a couple of cross and dot products. Out come the distance t and the barycentric coordinates u and v in one go.

No per-triangle plane data needs storing, which mattered when memory was tight. Today it sits in almost every software ray tracer, in raycasts against mesh colliders and in mouse picking. Early exits on u and v mean most misses bail out halfway through.

← Back to the lexicon