How can I get normal shading on a SKSpriteNode with a custom shader?

I've been doing some work in SpriteKit, and I can't seem to get custom shaders and the pseudo 3D lighting effects from a normal texture to work at the same time.

I have a pair of PNG textures, representing a shape with its basic coloring, and a normal map of the same image. If I create an SKSpriteNode, using those textures and add a light to the scene, I see the bumpiness and beveled edges I expect.


In the code below, cactus is an SKSpriteNode and light is an SKLightNode, defined on the class.

cactus = SKSpriteNode(imageNamed: "Saguaro.png")
cactus.normalTexture = SKTexture(imageNamed: "Saguaro_n")
cactus.position = sceneCenter 
cactus.lightingBitMask = 1 

light = SKLightNode() 
light.position = CGPoint.zero 
light.lightColor = UIColor.white 
light.isEnabled = true 
light.categoryBitMask = 1 
light.ambientColor = UIColor.white 
light.falloff = 0.3


If, however, I add a custom shader, I get the flat color of just the colors in the texture image. (Code below)

cactus.shader = myShader
// Contents of fragment shader source code file:

void main(void) { 
     gl_FragColor = SKDefaultShading(); 
}

Preferably, I'd like to be able to use a fragment shader to provide different color information than the texture, then have SpriteKit apply the shading. Is there a way to pass the output from my fragment shader to another stage of rendering for normal maps. The closest I've come up with is to make a texture from a sprite using a fragment shader, then using that as the texture for my display sprite.