skyrim-community-shaders icon indicating copy to clipboard operation
skyrim-community-shaders copied to clipboard

Interior Sun shadow split

Open Dlizzio opened this issue 1 month ago • 1 comments
trafficstars

The shadow resolution after the shadow split decreases significantly and that requires us to develop the wall meshes in a way that is impractical for interior sun.

Our current implementation of wall meshes to prevent volumetric lighting bleed is placing a mask at least 30 units away from the wall. This is more then enough to block light bleed as well before the shadow split (with iShadowMapResolution=4096). 30 units away matches the resolution of the volumetric lighting and prevents it from bleeding through. Once the camera moves away and the second shadow split begins and the light bleed requires placing a mask 70 units away from the wall to prevent light bleed due to the resolution of the shadow after the shadow split.

Creating wall meshes with masks 70 units away is impractical and would prevent interior shadows from casting any shadow because of the angle of the sun. Older builds before upscaling was implemented, this was still a problem but not noticeable because screen space shadows was stronger. A solution would be to increase the shadow resolution specifically after the first split to double what it is currently. I am not noticing any more shadow splits then just one (verified by looking at other end of building on a mesh with a 70 unit away mask).

Currently skyrim's default (iNumSplits) is set to 2, changing it to 1 or 3 breaks the shadows completely. Setting it to 0 crashes the game on launch. The first video shows an example of masks placed 30 units away (interior shadow distance set to max). The second video shows a better example of what is happening to the shadows after the split. Increasing the first slice distance (fFirstSliceDistance) is capped after a certain point and is still just as noticeable as if it was set to default. To make things worse you would need to double the shadow resolution to match doubling the first slice distance.

First video

Second video

How to replicate issue:

Download DWS test and install like any other mod. Download latest github AIO build. coc to WhiterunDragonsreach. Open the CS menu and under "Interior Sun" change "Interior Shadow Distance" to 6000 or max. Change interior volumetric lighting as well under "Volumetric Lighting" if you want.

Solution: Double shadow resolution after initial split. Make sure there is only one shadow split for interiors. Masks would need to be placed 35 units away from the wall mesh. If we could place it 30 units by increasing the resolution slightly more that would be perfect.

Dlizzio avatar Oct 16 '25 13:10 Dlizzio