(Continuation of this thread)
I’ve managed to put together an example of this shading and how it could be done with multiple lights.
Thanks to @Pawel for setting the building blocks for this type of stuff in Defold.
The README.md is a walkthrough of how it works and how one would implement this for themselves. Please feel free to expand on this and optimize it.
Disclaimer: There may some sort of compatibility or version issue with HTML5 that causes the fragment program to not compile. This doesn’t work on HTML5 for now.
This issue has been fixed, and this method works with HTML5.