I have a light and a sprite, and I only want the parts of the sprite that itersect my light source to be visible. How can I do that? When I try to use a masking blend mode, the sprite is colorless.
Edit: Sorry for the bad question, I thought this was simpler than it now seems to be. @eons solution works great for basic sprites/textures, but I want my sprites to use their normal map. When I set "Shading Mode" to "Light Only" only the normal map is visible, the rest of the sprite is black.
It still looks that way if the Light2D is Mix or Mask. However, if the material of the regular sprite (on right in the picture) is set to "Light Only" it is hidden just fine as described in the example project.
Normal mapping is achieved by pasting this code into the "Fragment" section of the CanvasItemShader and linking the proper normal map as a shader param. Since the masking stuff is not working for normal mapped sprites, is there something wrong with my shader? I don't know much about shaders unfortunately.
uniform texture normal;
//normal maps expect Y-up, but 2D is Y-down, so must mirror this.
NORMAL = tex(normal,UV).rgb * vec3(2.0,-2.0,1.0) - vec3(1.0,-1.0,0.0);