
Now how you do compute the solid angle pdf of the camera ray? You might think it's something uniform, but it's not. The reason is that a camera ray is usually generated by uniformly sampling the pixel area on the image plane. A uniform image plane area density results in a non-uniform solid angle density for the ray direction. The solid angle pdf can be computed by multiplying the uniform image plane area pdf (which is simply 1/image_size) by the inverse of the factor you use for the conversion above, i.e. 'dist^2 / cos(theta)', where 'dist' is the distance from the pinhole to the image plane point, and 'theta' is the angle between the ray direction and the camera viewing direction. This is all very simple to derive geometrically on a piece of paper, and I'm puzzled by the obscure explanations of the camera model in BDPT in all related documents I've seen. It's just converting measures area -> solid angle -> area. So in summary, the camera cosine appears in the pdf of the first point seen from the camera.