setShadowCaster() and multiple display regions

Hi all,

I’m having trouble getting shadows created with setShadowCaster( True ) showing in all display regions. I’ve found a few posts here on the forums with similar issues, but from what I can gather they were using shaders.

With my current setup I have two display regions being rendered from two different cameras. I must be missing something simple like an attribute on my other camera. Can anyone help me out on this?

Thanks in advance!

Perhaps the auto-shader isn’t enabled on one of them?

Thanks for the reply, rdb.

I’ve tried calling setShaderAuto() on my cameras and the root nodes they render but I’m still having the same issue. Is there anything else I could try?

I’m just tried this on another machine and I get a different result. On the laptop I’m getting correct lighting in the ‘Game’ region and no lighting at all in the ‘editor’ region. On my desktop I get the image below, where it looks like the shadow map is borked for the editor region. Could this a hardware issue or something?

Perhaps you could put together a simple sample that demonstrates the problem, and put it up at the bugtracker?

Hi rdb, whereabouts can I find the bugtracker?

Here’s some code which will show you the issue.

from direct.showbase.ShowBase import ShowBase
import pandac.PandaModules as pm
base = ShowBase()
win = base.openWindow()
cam2 = base.makeCamera( win ) 6, -10, 30 ) 0, -60, 0 )
cam2.setPos( )
cam2.setHpr( )

b1 = loader.loadModel( 'box' )
b1.setPos( 3.3, 3.6, 1.3 )
b1.setScale( 2.7, 2.7, 2.7 )
b1.reparentTo( render )

b2 = loader.loadModel( 'box' )
b2.setScale( 12.5, 12.5, 2.7 )
b2.reparentTo( render )

spot = pm.Spotlight( 'newSpot' )
spot.setColor( 10 )
spot.setShadowCaster( True )
spotNp = render.attachNewNode( spot )
spotNp.setPos( 5, -8.5, 3.5 )

render.setLight( spotNp )

Under the community tab in the website’s top menu. Here’s a direct link:

Thanks, Copper :slight_smile: I should have looked around a bit first :blush:

Bug submitted.

This is what I get: