This has been requested numerous times, so i finally stepped in and made something that works.
This is far from a perfect solution, and enhancements are already in my mind, but i think having it as a basis is good enough.
This is using 6 different shadow maps, one for each direction. I plan to make it work with a cubemap, that should be faster.
Also i duplicated a lot of code from the PSSMRenderer so i’m gonna refactor this a little bit.
The API should stay the same though.
So basically you have now a PointLightShadowRenderer and a PointLightShadowFilter (using one or the other depends on how many objects cast and receive shadows like for PSSM)
You can check the usage in the test case called, guess what, TestPointLightShadows
http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/test/jme3test/light/TestPointLightShadows.java
it’s basically like the PSSMRenderer but instead of setting the light direction you just feed the processor/filter with the light itself.
I plan to do this for the pssmRenderer too, it allows to set the position of the light on each frame so if the light moves, the shadows also move.
One more thing, this feature already exists with the PSSMRenderer but it’s more likely that people will want it with pointlight shadows :
If you want several light to cast shadows you have to make a processor/filter for each one.
BUT, you have to set pointLightShadowRenderer.setFlushQueues(false) on all the processors except the last one.
This avoid the shadow queues to be flushed after rendering the shadows so another processor can use the shadow queues.
Feel free to make suggestions, ask questions, report issues, give some hugs