Old Moon

A planetary simulation for a weird setting

Details

Physics

4th-order Hermite integrator with adaptive (Aarseth) step. Each body is updated at its own rate, which makes the simulation run pretty fast even having different bodies with various orbital periods.

Shaders

  • ShaderGraph shaders for stars (based on Musgrave noise) and their billboards;
  • HLSL ribbon mesh shader for body trails, building the mesh fully on GPU from a StructuredBuffer ring buffer of trail points fed into it;
  • HLSL shaders (Blinn-Phong + Fresnel) for planets. They accept a list of light sources and occluders with their radii, treating them as ideal spheres to cast shadows independent of how far the light sources are located;
  • other various HLSL and ShaderGraph shaders for UI elements.