Shaders in WebGL
The color is determined in accordance with lamberts law, ie light intensity at a point is scaled down by the angle of incidence of light at that point. The formulation becomes: finalColor = color * lightIntensity * cos(theta); where theta isthe angle between the surface normal and the inverted incoming light ray (line from that point to the light source).
The color is made to be view point dependent in this shader.
The color from lambertian shading is binned into a particular bucket to give the image a cartoony look. There can be any number of buckets but the more there are the closer the shading gets to lambertian shading.
This shader takes lambertian shading and overlays noise on top of the mesh; This noise can be controlled by a threshold value.
Linear Tone mapping
This tone mapping produces better blacks; There are controls for gamma and Exposure.
Reinhard Tone mapping
This tone mapping produces better blacks, and less saturated whites; There are controls for gamma and Exposure.
Filmic Tone mapping
This tone mapping is like reinhard tone mapping but produces even better blacks, and similarly less saturated whites; There are controls for gamma and Exposure.
Creates a vignette over the image.
Lens Distortion mapping
Creates a lens centered at the origin, that magnifies the portion of the image behind it to the point of distortion.