Author Topic: Making a starfield in GLSL  (Read 5424 times)

0 Members and 1 Guest are viewing this topic.


  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2883
Making a starfield in GLSL
« on: February 11, 2020, 04:43:35 PM »
Star fields were some of the first effect I ever coded, back in the late 80's. I decided to revisit this effect and make a 2020 shader version of it. In this video we'll be making this effect in SHaderToy, from scratch!

Shader Coding: Making a starfield - Part 1:

Shader Coding: Making a starfield - Part 2:

Shadertoy demo:
- GeeXLab demopack:,5837.msg8842/topicseen.html#msg8842

starfield in GLSL


  • Guest
Re: Making a starfield in GLSL
« Reply #1 on: February 13, 2020, 05:22:50 PM »
How would one go about implementing a starfield like this? I have tried generating random white pixels on the screen and then re-generate them as they move off screen either due to player forward motion or rotation, but it doesn't feel like stars in space at all. Should I generate a cloud of billboards around the player instead? These stars are just for cosmetics, so they will always be far away, but I do want the effect of you zooming past them.