# Shadow volumes: new WholeSceneManifold option, fixes and docs

**URL:** https://forum.castle-engine.io/t/shadow-volumes-new-wholescenemanifold-option-fixes-and-docs/811
**Category:** News
**Created:** [May 20, 2023, 9:10am UTC](https://forum.castle-engine.io/t/shadow-volumes-new-wholescenemanifold-option-fixes-and-docs/811 "2023-05-20T09:10:05Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![michalis](https://forum.castle-engine.io/user_avatar/forum.castle-engine.io/michalis/32/3_2.png) [@michalis](https://forum.castle-engine.io/u/michalis)
#### Post date: [May 20, 2023, 9:10am UTC](https://forum.castle-engine.io/t/shadow-volumes-new-wholescenemanifold-option-fixes-and-docs/811/1 "2023-05-20T09:10:05Z")

</div>

| [![Shadows in editor](https://forum.castle-engine.io/uploads/default/original/2X/7/7345de767f5343d749c497ea43d0bffecf34bfcd.png)](https://castle-engine.io/wp/wp-content/uploads/2023/05/screenshot_editor-1.png "Shadows in editor") |
| [![Shadow volumes](https://forum.castle-engine.io/uploads/default/original/2X/6/67e588a3abbd4c491b0eeb86e01653c7f73cd810.png)](https://castle-engine.io/wp/wp-content/uploads/2023/05/screenshot-1.png "Shadow volumes") |
| [![WholeSceneManifold demo in editor](https://forum.castle-engine.io/uploads/default/original/2X/d/d3b22c4fe0ad1d514ac10596e1bbf24dd7b00c82.png)](https://castle-engine.io/wp/wp-content/uploads/2023/05/screenshot_editor.png "WholeSceneManifold demo in editor") |
| [![WholeSceneManifold demo](https://forum.castle-engine.io/uploads/default/original/2X/1/1161cdc520500a0e4a2764332de883f9113f5088.png)](https://castle-engine.io/wp/wp-content/uploads/2023/05/screenshot.png "WholeSceneManifold demo") |
| [![Select Non-Manifold in Blender](https://forum.castle-engine.io/uploads/default/original/2X/1/14a0641d8378ee0289d9149fd2b9baf32a72bc31.png)](https://castle-engine.io/wp/wp-content/uploads/2023/05/blender_non_manifold.png "Select Non-Manifold in Blender") |

1. A new feature of our [shadow volumes](https://castle-engine.io/shadow_volumes) is that you can turn on `TCastleRenderOptions.WholeSceneManifold` to say that _the whole scene_ must be a closed volume (2-manifold), not necessarily _each shape_.

2. An important fix was done to our algorithm that culls shadow casters in case shadow volumes are cast by directional lights. Previously sometimes the shadows could disappear when the shadow caster was not visible — causing funny artifacts (shadows unexpectedly disappearing) in certain views. This is fixed now.

3. Interaction of frustum culling (`TCastleScene.SceneFrustumCulling`, `TCastleScene.ShapeFrustumCulling`), distance culling (`TCastleScene.DistanceCulling`) and shadow volumes is now simpler and more reliable. If we render shadow quads for something, then we have to also render the shadow caster.

4. As part of this work, we’ve also removed long deprecated properties `TCastleScene.FrustumCulling` and `TCastleScene.OctreeFrustumCulling`. They allowed to configure details… they weren’t really ever useful to configure, in my experience. We recommend to use instead a simpler boolean `TCastleScene.ShapeFrustumCulling` for a long time now, and even this is usually something you don’t really need to care about. As always, [make a noise on our forum or Discord](https://castle-engine.io/talk.php) if this change affects your project in any way. From my experience, all usage of these old properties can be just removed — tweaking them most likely didn’t have any effect on the performance anyway.

5. Finally, our [shadow volumes](https://castle-engine.io/shadow_volumes) documentation was much improved.
