Add function for clearing global shader instead of duplicating the code