https://hgpu.org/?p=2486
Barycentric coordinates computation in homogeneous coordinates