See from the Collection of examples from discourse.threejs.org
ShaderBeginner Little Shader Book
a bit more complicated …