Extending PointLight uniforms

Are you sure masking lights by uniforms will save a lot?

Since you are already digging into the source of WebGLLights (:+1: for that!) , would it be an option to extract the relevant code that defines light counts and types and put it in onBeforeCompile on your custom material (but adding only the lights that you want, instead of masking in the shader), and extract the code that sets light-related uniforms and put it in onBeforeRender of the lightmapped objects?