Create better flow in functions for shaders