From this site: http://www.toymaker.info/Games/html/vertex_shaders.html We have the following code snippet: