Interstellar

By Geyu Liu

“Interstellar” is an extended version of Assignment 6 (Shader Pipeline). It renders a small animated solar system inside a rich procedural night sky, with:

All visual effects are implemented procedurally in the GLSL shaders. No external textures or 3D models are loaded.

The main shaders and logic live in:

Explicit List of Features and Code Locations

1. Procedural night sky with Milky Way and shooting stars

I replaced the plain background with a fully procedural night sky:

All of this logic lives under the branch:

 if(object_id == 4) { ... }

in planet.fs.

2. Enhanced Earth and Moon shading

Earth:

Moon:

The main logic is under:

 if(object_id == 0 || object_id == 1) { ... }

in planet.fs.

3. Glowing animated Sun

The Sun is implemented with:

This logic is in the if(object_id == 3) block in planet.fs.

4. Glass / crystal planet with thin icy ring

Glass planet (object_id 2):

Icy ring (object_id 6):

The orbit and model transforms for the glass planet and its ring are in the “Glass planet base orbit” section of model.glsl.

5. Procedural UFO with cartoon alien

Geometry (TES):

Shading:

Alien:

The UFO’s position, bobbing motion, and gentle rotation are defined in the if(id == 5) branch of model.glsl.

6. Elliptic white spaceship with blue cockpit and red flickering tail

Geometry (TES):

Shading (fragment shader, object_id == 7):

All of this logic is in the if(object_id == 7) block of planet.fs. The orbit of the spaceship is defined in the if(id == 7) block in model.glsl, where the ship flies on a large loop around the whole system so it does not collide with other planets.

7. Custom orbits and animation for all bodies

The model(bool is_moon, float time) function controls the transform of each object:

Acknowledgements