I added your lines of code to my program and it worked but I had to add the line to tell the spot where to point using: spotnp.look_at(x,y,z) where x,y,z is the point where it should shine.
Also, the color RGB values should be in the range 0 to 1
you have:
spot->set_color(LVecBase4f(100, 0, 0, 1));
did you mean:
spot->set_color(LVecBase4f(.39, 0, 0, 1));
Do you have a lot of ambient light in your scene ?
I turned my ambient off so I can see the shadow…
yes, I saw the screen shot, I clicked on it to see full size.
Are things still not working ?
Looks like there is no ambient light on the stone, but
everything else looks very red. I put model panda next to a model cabin and cast shadow on both terrain and cabin wall. Make sure you don’t have any node.set_light_off() on your building model or ground plane, I don’t see any cast shadow anywhere in your scene. Maybe you can put a model on the spot light node path to see where the spot light is being placed and pointed.
oh, a shader error
I looked around for that specific error but haven’t found anything, but some people with Mac were having shader problems. Are you using a Mac ?
I’m using a PC with Panda version 1.7.0
What version are you using ?
I saw some comments for Mac like try updating graphic drives, and one that said:
“Try to set to false basic-shaders-only in your Config.prc file”
Not sure if any of these will help you…
I’m sure one of the Panda core developers can help you with this problem.