My custom shader's point light shading does not support layer.

Hi~

The shader wrote by me, it’s point shading part dose not support layer. So I can’t have full controll to controll it. The following code is the part of point light shading in pixel shader. I can’t copy/paste the whole shader, so I type the part of point light shading.

fixed3 pointsLight = Shader4PointLights(
      unity_4LightPosX0, unity_4LightPosY0, unity_4LightPosZ0,
      unity_LightColor[0].rgb, unity_LightColor[1].rgb, unity_LightColor[2].rbg, unity_LightColor[3].rgb,
      unity_4LightAtten0, input.worldPos, normalize(input.worldN)) ;

Rendering pipeline is forward.

After I have typed the flowing code into my vertex shader, it can be controlled by layer. So I think the macro VERTEXLIGHT_ON affect layer.

#ifdef VERTEXLIGHT_ON
utput.shLightAndPointsLight += Shade4PointLights(
unity_4LightPosX0, unity_4LightPosY0, unity_4LightPosZ0,
unity_LightColor[0].rgb, unity_LightColor[1].rgb, unity_LightColor[2].rgb, unity_LightColor[3].rgb,
unity_4LightAtten0, worldPos, worldN) ;
#endif