vastly deduplicate shader creation code

slightly improve error handling

resolve several minor TODOs

(0) -100 -30 -10 -3 +3 tip

mercurial