In order for volumetric rays (vanilla god rays) and shadow casting to work better, a low resolution terrain mesh - the "underside terrain" - can be generated for all large worldspaces with LOD for the current load order.
These meshes are placed slightly under the full terrain and aid mods like Enhanced Volumetric Lighting and Shadows and face the opposite direction and set the cast shadow flag, which is currently not possible on terrain in the active exterior cells or has no effect when done on terrain LOD meshes.
Disable any plugins or mods that contain an underside mesh like DVLaSS Skyrim Underside, which was made by extracting this automatic generation from DynDOLOD into a mod.
Generation
In order to enable the generation and automatic placement of the meshes, check Terrain underside in the advanced mode. The underside meshes generation is automatically checked if the SKSE DLL (DVLaSS.dll or EVLaS.dll) is detected in the load order.
In addition consider to uncomment (remove the ;) DoubleSidedTextureMask=mountain,mtn in ..\DynDOLOD\Edit Scripts\DynDOLOD\DynDOLOD_[GAME MODE].ini, so that the object LOD for mountains (the rocks) blocks sun rays as well.
Optional Configuration
Quality - defines the resolution. Higher numbers mean better performance but with a higher chance of the coarse terrain underside mesh visually peaking through the actual terrain or terrain LOD.
Height - sets the negative distance to the actual terrain. Lower numbers mean better blocking at a higher risk of the terrain underside mesh visually peaking through the actual terrain or terrain LOD.
Updating
To test different Quality and Height settings or to only update the terrain underside meshes for an already existing DynDOLOD output installation, keep the current DynDOLOD output installed. Start DynDOLOD as usual with the existing DynDOLOD plugins and switch to the Advanced mode. Unchecked all other options but the Terrain underside checkbox. Merge the new DynDOLOD output with the old DynDOLOD output. See Updating for more.
Troubleshooting
If the terrain underside mesh can be seen poking through the near ground, improve its quality by lowering the Quality value or lower the mesh by increasing the Height value.
If the terrain underside mesh can be seen in the distance, increase the object LOD distances and/or the terrain LOD distance multiplier in the DynDOLOD SkyUI MCM settings.
LOD does not cast or receive shadows. This can be mitigated by the ENB distant shadow effect or Screen-Space Shadows.