Version 5:
I have added code to render the stars using textures.
Version 4:
The shader now works by default with Godot 4.0+. There are comments in the shader explaining how to make it work with older versions of Godot.
Version 3:
The shader had been updated to add:
An extra layer of large stars.
Variable star size and color based on their distance.
Different star rendering options: hard and soft edged circles, hard and soft edged crosses, squares, and diamonds.
Guidance on replacing the TIME constant with a time uniform that you can update from your game’s _physics_process function to control the scrolling direction and pause scrolling.
Hi everyone,
I have just released a canvas item shader for Godot Engine that renders a starfield with simulated parallax scrolling. It can be configured to scroll horizontally or vertically.
It is released under the MIT licence and so can be freely used in your game projects.
It was written in Godot's shader language which is similar to GLSL ES 3.0 and so it can probably be easily adapted to work in other game engines.
https://steampunkdemon.itch.io/pixelated-starfield-shader-with-paralax-scrolling...