Shadows and multiple texture stages

Hi, I can’t use shadows on multiple texture stages. I have the following code:

from pandac.PandaModules import CardMaker, Spotlight, AmbientLight, TextureStage
import direct.directbase.DirectStart
base.disableMouse() 
render.setShaderAuto() 
camera.setPosHpr( ( 20, -20, 15 ), ( 35, -18.5, 0 ) ) 
loader.loadModel( 'panda' ).reparentTo( render ) 
def setupFloor(): 
  cm = CardMaker( '' ) 
  cm.setFrame( -40, 40, -40, 40 )
  n = render.attachNewNode( cm.generate() )
  n.setP( -90 ) 
  ts = TextureStage( 'ts' )
  t = loader.loadTexture( 'maps/envir-rock2.jpg' )
  n.setTexture( ts, t )
  ts2 = TextureStage( 'ts2' )
  ts2.setMode( TextureStage.MDecal )
  n.setTexture( ts2, loader.loadTexture( 'maps/envir-reeds.png' ) )
def setupLight(): 
  light = render.attachNewNode( Spotlight( 'Spot' ) ) 
  light.setPosHpr( ( 0, -30, 30 ), ( 0, -45, 0 ) ) 
  light.node().setShadowCaster( True, 1024, 1024 ) 
  render.setLight( light ) 
  alight = AmbientLight( 'alight' )
  alight.setColor( ( .2, .2, .2, 1 ) )
  render.setLight( render.attachNewNode( alight ) )
setupFloor()
setupLight() 
run()

It produces:

As you can see, I have no shadows on “envir-reeds”. How can I obtain the correct shadowing? Thank you!

If you want to do it this way, you’ll need to have another stage that multiplies it by the primary colour, which includes lighting (like shadows).