It's been a surprisingly long time since I last threw together a project within a day. I made several changes to the shading model of @griffpatch's project to more closely match the look of Earth in real pictures from space, for example the pictures taken by Artemis II. The project is considerably laggier now, so I recommend using TurboWarp: https://turbowarp.org/1367740693 Original Instructions by @griffpatch: Inspired by an awesome project by a fellow Academy Member @kotucheniy101 - I was experimenting to see just how optimised a textured sphere could be... Went to trouble of adding specular water and an attempt at an atmosphere... It's rather fun! - hold z to change sun position quicker
Removed remapping of diffuse negative values to positive values in favor of a defined terminator line. Calculates shading in RGB instead of brightness+saturation. Added gamma correction. Added atmosphere shading, removed halo sprites. Surface lighting tinted slightly yellow. Specular highlight multiplied by a rough approximation of Fresnel reflectance. Original Notes and Credits by @griffpatch: I used gobo script to help code the main engine. We have ray-sphere intersection + Equirectangular texture mapping - textures from NASA's blue marble and mapped using python. The lighting model is Lambertian diffuse with Blinn-Phong specular highlights for the water. Hand optimised to be as fast as I could get it in Scratch... so far :D