Automatically handle VRML/X3D "receiveShadows" field by inserting appropriate lower-level nodes.
If Enable is True, the appropriate lower-level nodes are added, or replaced (if they already existed, because you call ProcessShadowMapsReceivers again). If Enable is False, the appropriate nodes (added by previous calls to ProcessShadowMapsReceivers) will be removed instead.
For each shape with "receiveShadows", we:
extend it's "texture" field with appropriate GeneratedShadowMap,
extend it's "texCoord" field with appropriate ProjectedTextureCoordinate,
Types
TShadowSampling = (...);
Values
ssSimple:
ssPCF4: Percentage Closer Filtering improve shadow maps look, by sampling the depth map a couple of times. They also make shadow more blurry (increase shadow map size to counteract this), and a little slower. They may also introduce new artifacts (due to bad interaction with the "polygon offset" of shadow map).
ssPCF4Bilinear:
ssPCF16:
ssVarianceShadowMaps: Variance Shadow Maps, see http://www.punkuser.net/vsm/ . This may generally produce superior results, as shadow maps can be then filtered like normal textures (bilinear, mipmaps, anisotropic filtering). So shadows look much nicer from very close and very far distances. However, this requires new GPU, and may cause artifacts on some scenes.