fully modified to have primary space sampled rays