Ideas and suggestions needed for Improving p5.js WebGL mode in GSOC 2019

fallOff(constant, linear, quadratic)

In a general sense, it can be used to limit the spread of diffusion from the lights, or vice versa. The falloff factor can also control the intensity of light.

Arguments-

  1. Constant
  2. Linear
  3. Quadratic

These arguments would be used to calculate the falloff as-

falloff = 1 / (CONSTANT + d * LINEAR + (d*d) * QUADRATIC)

where d is the distance from light position to vertex position.