Geeks3D Forums

Tech Forums => 3D-Tech News Around The Web => Topic started by: JeGX on February 11, 2020, 04:43:35 PM

Title: Making a starfield in GLSL
Post by: JeGX 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


(https://ozone3d.net/public/jegx/2020q1/geexlab-shadertoy-starfield-tutorial-01.jpg)
Title: Re: Making a starfield in GLSL
Post by: stevejock1 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.