header

texture modified from this found on this post

This example shows how to load a texture with lg.texture().load("url/to/tex.jpg")

It also uses Geom.quad(32,64) to generate a mesh instead of manually defining each vertex.

To debug a glsl code, we cannot print variables as we would need every pixels to print. Moreover glsl doesn't support strings (well you can but it's a lot of work). So a way is to litterally print values onscreen. You can see a commented out code were I used to look at the weight parameter.