Shadow maps in 2025?

Various answers:

  • Currently, the shadow receiver and the light casting shadows must be in the same scene. It doesn’t matter where the shadow caster is, it can be in different scene.

  • There is no concept of “light just for shadow use” for shadow maps. “Shadow” means (in a simulation of shadow maps and in reality :slight_smile: ) that a light doesn’t reach the object. So the light must really shine to make the shadow sensible.

  • I don’t really recommend to merge many things together in 1 scene with 1 X3D root node. We want to optimize world with many scenes, not with 1 big scene, though some things work better this or that way. In practice, a “healthy mix” works best, see Optimization and profiling | Manual | Castle Game Engine . If you have a case where just combining 100 TCastleScene instances into one TCastleScene instance with one X3D graph makes it much faster → submit a bug with a testcase to reproduce, because usually it should not make a big difference (unless you do something more at merging).

  • It would be bad if you are forced to merge into one scene by our unoptimal shadow maps implementation. I feel that our problems in the shadow maps area really should not guide this design decision how you use CGE, as it will affect many things :slight_smile: We should just improve shadow maps on the CGE side.

All in all, I’m afraid it will be complicated to setup for you, and the gains are not that obvious. Shadow maps also have a performance hit, just in a different place. And they look much different.