shadering update

added flag to toggle the output to file