correct attenuation factor
update demo
change attenuation constants to a parameter

This makes it possible to pass different attenuation values
in the same shader.