This was done with reference to the paper Real-Time Polygonal-Light Shading with Linearly Transformed Cosines, which is a pretty fast way to handle lighting accurately. Also with referene to the amazing demo the authors provided.
2022 note: Twas overkill? Probably.
The shader is intensive and might crash mobile browsers. Click to see the shader at shadertoy:
Very long, refer to the shadertoy link.