reworked shader functionality to be more flexible