Generator for building pre-compiled triangle maps by offloading the generation to the GPU.
Approach:
Write out a single texture (our pre-compiled texture map)
Reverse the fragCoord to determine the 3 triangle coords
Perform a rasterisation of the triangle within the fragment shader using the orignal image as lookup
Note: on Windows, it may be better changing the render to OpenGL (in Chrome, go to chrome://flags/, search for 'Angle') for better performance and prevent Webgl crashes for higher resolutions.