add lots of debugging functions, fixed idiotic shader copy-paste error