s_epsilon1e6
global · unassigned
- Address
0x80e2e4· 4 bytes, up to0x80e2e7- Type
const float- Meaning
- Holds 1e-6, a pooled tolerance; the ray triangle test bounds its determinant with it
- Confidence
- verified, proof one
- Finding
- models/scene#ray-triangle-test
Finding: Ray triangle test in models: the scene
The triangle test is two-sided Möller–Trumbore: with e1 = v1 − v0, e2 = v2 − v0 and
p = d × e2, it misses when |e1·p| < 1e-6; with s = o − v0 and q = s × e1,
u = (s·p)/det and v = (d·q)/det must each be at least −ε, and u and u + v at most
1 + ε; t = (e2·q)/det and (u, v) are written when asked. It does not bound t.
The derivation is in the doc.