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

0 Members and 1 Guest are viewing this topic.

JeGX

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2316
    • Geeks3D.com
Making a starfield in GLSL
« on: February 11, 2020, 04:43:35 PM »
Quote
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:
- https://geeks3d.com/newz/item?id=61

Shader Coding: Making a starfield - Part 2:
- https://geeks3d.com/newz/item?id=62

Shadertoy demo:
- https://www.shadertoy.com/view/tlyGW3
- GeeXLab demopack: https://www.geeks3d.com/forums/index.php/topic,5837.msg8842/topicseen.html#msg8842


starfield in GLSL


stevejock1

  • 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.