Add more function docs to material.lua