Implementing a deferred raycaster