Generating rays from background light