On the largest cosmic scales we assume the statistical isotropy and homogeneity of the matter density field. However, our knowledge comes mostly from observing the universe via messengers like photons which can be disturbed during their propagation, resulting in a distortion in our perception of the Universe. In order to extract cosmological information from observations, it is therefore mandatory to precisely model our Universe, from the formation of structures to the propagation of photons. During this talk I will discuss numerical high-performance computing methods to achieve both. In particular, our ray-tracing techniques which directly integrates the null geodesics within the refined structure of N-body simulations enables a wide range of analysis beyond standard weak lensing and relies on less approximations. These methods allow us to improve the modelling of standard cosmological probes, which will be important for next-generation galaxy surveys.