debug mode and stuff. still can't write to texture properly