Method for rendering lots of stars/points that are infinitely far away.

I’m trying to do something similar with a hdri background how can I adapt this to work?