Hi all, I made a simple shader to simulate the phases of the moon for a 2D canvas_item shader. It simulates the UV value as a point on sphere as well as a distance light source, and calculated the vec3 dot product to determine shadows. Uses a noise texture to obtain a stippled shadow effect for the edge between light and dark:
Code and images posted to GodotShaders.com:
Moon Shader 2D All Phases and Roughened Shadow - Godot Shaders
Video: https://youtu.be/wbN-Q_IRJbw