I have a Texture2D of the Moon, and I want to render different moon phases so that it visually matches the examples shown here [Celestial Programming : Moon Phase Image Rendering][1], I've tried several approaches, but I haven’t succeeded so far.

So, is it possible to achieve this using a unity script and Texture2D?

**For reference, here’s my Moon texture:**

[![enter image description here][2]][2]


 [1]: https://celestialprogramming.com/snippets/moonPhaseRender.html
 [2]: https://i.sstatic.net/HlqEzbIO.png