refactor shader a bit, add material class