I think I finally got a shader working that allows Unity 4.3 Sprites to take normal maps (now properly) and cast shadows.
The sprite on the left is a 2D toolkit sprite and the one on the right is the Sprite GameObject animated (please ignore the poor animation :P).
An important step though is to enable casting and receiving shadows in your Sprite gameobject, since this is disabled in the Spriterenderer by default.
You use renderer.castShadows = true and receive.castShadows = true for this.
I posted this on the Shaderlab forum already, but thought it would be useful to share it here too.
Works well for clipped sprites, but this also means no alpha and aliased edges when the edge is antialiased with transparency. What’s really needed is a shader that applies the alpha to the normal as well, or rather applies normal mapped lighting to the sprite and then applies alpha blending to the result. Maybe this needs a second pass?
I know this thread is pretty old now, but I was wondering if the normal maps are applied to the currently animating sprite? e.g. Say I have a spritesheet for an object with normals laid out on it already. When I animate the spritesheet, will the corresponding normal be applied? Thank you for your time, if anyone stumbles across this and knows the answer.