Project a view-space sphere to its screen ellipse area in buffer pixels.
Perspective: radii scale by P[0]/depth and P[5]/depth (the projection
matrix's focal terms); a camera inside or in front of the sphere
(depth <= radius) counts as full-buffer. Orthographic: the focal terms
apply without the depth division. Off-screen (the ellipse does not touch
the NDC square) returns 0; otherwise the ellipse area, clipped to the
buffer. The clip is a coarse min, not an exact intersection — the guard
only needs the order of magnitude.
Project a view-space sphere to its screen ellipse area in buffer pixels.
Perspective: radii scale by
P[0]/depthandP[5]/depth(the projection matrix's focal terms); a camera inside or in front of the sphere (depth <= radius) counts as full-buffer. Orthographic: the focal terms apply without the depth division. Off-screen (the ellipse does not touch the NDC square) returns 0; otherwise the ellipse area, clipped to the buffer. The clip is a coarse min, not an exact intersection — the guard only needs the order of magnitude.