you can remix this and add your own tile generation code. and replace distance to mouse for distance to (light source, could be player or anything else. it dont matter) change brightness and brightness multiplier as needed.