Skip to main content

invert_screen_to_plane

Function invert_screen_to_plane 

Source
pub fn invert_screen_to_plane(model: &Mat4, screen: Vec2) -> Option<Vec2>
Expand description

Map a physical-px screen position back onto the layer plane (untransformed physical px). None when the plane is edge-on (degenerate homography), the recovered point sits at infinity, or it lies behind the eye (past the vanishing line, where the quad is not visible). A backface (negative determinant) still inverts — backfaces render and stay clickable.