Compute ray directions per pixel.