I’ve been learning computer graphics for the past month and its all been in shadertoy with GLSL cause (just this low resolution thing is 2500 frames). It basically defines a sphere with conic sections then uses the ray parametric equation and some 3d dot product stuff to do it.
If you want to learn more about how I made this watch this