Space Generator
A space generator that makes random space textures.
Look at my code
GitHub
How it works.
Stars:
It puts a pixel with one of the predefined colors on a random postition on the texture, it then puts more pixels down around it until it's a square that's the size
inbetween the min star size and max star size. If the star is more than 2x2 it removes the corners, if it's more than 4x4 it removes an L shape from each corner.
It does this for every star it puts down until there are enough stars.
Background:
The background is based on perlin noise, it puts down the perlin noise in a predefined color and scales it up or down based on predefined values.
After doing this it lerps the right and upside with the left and down side to make it tileable.
Back