2001: A Space Odyssey
This is an entry for @sableRaph's weekly creative coding challenge. The theme for this week was movie title sequences, so I decided to recreate the titles for the Kubric classic 2001: A Space Odyssey in a shader.
Audio, if you unmute, is by Kevin McLeod, released under CC Attribution 3.0 on Wikipedia.
There's nothing groundbreaking in this shader, but it combines a few things:
- A linear gradient function, which is used (along with hand-picked colour stops) to create the glare around the sun
- Per-pixel noise, used to create stars and the land for the planet
- An approximation of Lambertian diffuse shading to create the shading for the planet
- Simple additive light around the edge of the planet (based on the distance to the edge) to simulate atmosphere