New light leaks in 2.12: Difference between revisions
cos3: more locations |
|||
Line 69: | Line 69: | ||
| cos3_sacricide | | cos3_sacricide | ||
| -1283.53 -380.68 83.25 15.2 -38.6 0.0 | | -1283.53 -380.68 83.25 15.2 -38.6 0.0 | ||
-1044.74 -488.21 -74.51 0.1 89.2 0.0 | |||
-1354.18 -806.16 76.39 11.0 -149.0 0.0 | |||
-1077.75 240.02 -39.05 9.1 142.6 -0.0 | |||
-216.02 -157.15 74.66 -8.8 -43.7 -0.0 | |||
-86.51 380.53 87.05 -13.3 -65.1 0.0 | |||
| [https://forums.thedarkmod.com/index.php?/topic/22241-new-shadow-leaks-in-212-dev-builds/&do=findComment&comment=489895 1] | | [https://forums.thedarkmod.com/index.php?/topic/22241-new-shadow-leaks-in-212-dev-builds/&do=findComment&comment=489895 1] | ||
| (not yet) | | (not yet) |
Revision as of 21:16, 24 February 2024
There is major change in TDM 2.12 regarding how shadows are generated due to issue #5172. As the result, some we might see some major light leaks in the old missions.
Description
As far as I know, the problem happens only with stencil shadows, because stencil shadows are cast from back faces only (shadow maps are generated by front faces too). The shape of such light leaks does not depend on the camera position. Usually the problem is caused by using caulk on brushes: light leaks through the caulk.
New behavior (default in TDM 2.12 and after):
- r_useLightPortalFlow = 2
- r_useLightPortalFlowCulling = 1
The shadows are computed differently for world areas and for models:
- Any worldspawn brush within light volume always casts shadow. Even if it is behind walls and closed portals.
- A model casts shadow only if light beams from the light origin might reach it through visportals. No shadows behind walls and closed portals!
As an exception, some models switch from p.2 to p.1 and cast shadows everywhere. For instance, this happens in case of parallel lights, and when entities are explicitly marked with the workaround spawnarg "forceShadowBehindOpaque".
Old behavior (default in TDM 2.11 and before):
- r_useLightPortalFlow = 1
- r_useLightPortalFlowCulling = 0
The behavior here is different depending on the type of light:
- Static lights use the new TDM 2.12 behavior, so models don't cast shadows behind walls.
- Dynamic lights: everything within light volume casts shadows, regardless of whether it's area/brush or model.
The light is static if it has not moved since game start. That's the case when engine uses precomputed shadow volumes for world geometry.
Validation
Before adding an issue here, please make sure to check the following steps:
- Start game afresh, install mission, setviewpos and verify that light leak indeed happens. Perhaps you need to open some doors nearby.
- Restart game afresh, set "r_useLightPortalFlow 1" and "r_useLightPortalFlowCulling 0", start mission. Check that light leak no longer happens.
The light leak can be caused by this issue only if both points are true.
List of issues
Mission name | getviewpos coordinates | Links to forums | Applied fixes |
---|---|---|---|
ws1_north | -1153.92 3523.22 -955.75 29.8 -145.6 0.0
-664.04 2894.9 -635.75 10.2 9.9 0.0 |
1 | svn rev 241: global workaround |
ws2_homeagain |
4385 420 -410 -30 -110 0 4178.12 391.47 -94.56 -28.8 43.6 0.0 4347.92 -271.22 57.53 -0.8 18.4 0.0 |
1 | svn rev 267: global workaround |
cos3_sacricide | -1283.53 -380.68 83.25 15.2 -38.6 0.0
-1044.74 -488.21 -74.51 0.1 89.2 0.0 -1354.18 -806.16 76.39 11.0 -149.0 0.0 -1077.75 240.02 -39.05 9.1 142.6 -0.0 -216.02 -157.15 74.66 -8.8 -43.7 -0.0 -86.51 380.53 87.05 -13.3 -65.1 0.0 |
1 | (not yet) |
poets | 1768.4 76.97 60.25 4.17 156.92 0.0 | 1 | in beta212-06 |
heartv2 | 1736.48 3691.68 -137.75 -5.4 101.1 0.0 | 1 | svn rev 274: workaround on func_static_46 |
gatehouse1_3 | -940.97 270.14 66.25 -3.97 146.34 0.0 | 1 | other issue |