implement color gradient based on position in basicShaders