parallelised ray casting