Windows Shadows Tuner
Adjust the size, blur and intensity of native Windows shadows.
Author: HaVeN80
Customize native Windows window shadows: make them lighter or more pronounced,
and adjust their size and blur.
Examples
Shadow intensity and size comparison

Dynamic shadows

Setup
dwm.exe is a critical system process and Windhawk doesn't inject mods into it
by default. Open Windhawk Settings, go to Advanced settings, then
More advanced settings, and add dwm.exe to the process inclusion list.

Controls
-
Intensity: controls the opacity of the native shadow. The default value is
180%. Set it to 100% to restore the original Windows intensity, 50% for a
lighter shadow, or 0% to make it invisible.
-
Size and blur: controls the shadow spread and blur. The default value is
150%. Set it to 100% to restore the original Windows size.
-
Dynamic shadows (experimental): simulates a light source at a fixed point
of the screen. Each window's shadow fades gradually as the window moves away
from the light, and updates live while the window is dragged.
- Light position: where the light is, relative to the monitor the
window is on. A corner or center point fades shadows by distance from
that point. An edge (top, bottom, left or right) lights the whole side of
the screen and fades shadows only as windows move away from it.
- Dimming strength: how much the shadow fades at the fade distance.
100% makes it invisible.
- Fade distance: how far from the light the shadow reaches its minimum,
as a percentage of the screen diagonal for point lights, or of the screen
height (top and bottom edges) or width (left and right edges) for edge
lights. Lower values give a shorter, more pronounced fade.
- Fade curve: how the shadow fades along that distance.
Dynamic shadows can only make shadows lighter. To get a strong contrast, raise
Intensity and let the distance from the light fade it.
When both controls are set to 100% and dynamic shadows are off, the mod doesn't
install any hooks because the requested appearance is identical to the
original Windows appearance.
How it works
The mod hooks CWindowBorder::GetShadowParameters and scales the radius and
alpha values it produces. To apply changes to windows that are already open
and restore the original shadows when the mod is disabled, the mod briefly
toggles the system drop-shadow setting off and on in memory so DWM rebuilds
every window's shadow. The user profile isn't modified and no settings-change
message is broadcast. Shadows can blink for a fraction of a second when the
mod is loaded, unloaded, or its settings are changed.
Dynamic shadows hook CTopLevelWindow::OnOffsetUpdated, which DWM calls every
time a window's position changes, and CTopLevelWindow::UpdateWindowVisuals.
It sets the opacity of each window's shadow sprite through the public
Windows.UI.Composition.IVisual interface. The shadow sprite also draws the
thin window border, so the border fades together with the shadow. Each
monitor has its own light, so a window's shadow can change abruptly when the
window's center crosses to another monitor. While "Show shadows under windows" is off
in Windows, dynamic shadows don't change anything.
The mod creates no overlay windows. The only value it stores is the time of
its last initialization, used to detect a DWM crash loop.
Compatibility
Tested with uDWM.dll 10.0.26100.9549 (Windows 11 24H2/25H2 servicing
branch). The uDWM symbols and field offsets used by dynamic shadows were also
verified by disassembly on uDWM.dll 10.0.26100.9278.
Dynamic shadows read four internal field offsets. At startup the mod checks
the uDWM code that uses them and, if anything doesn't match, disables only
dynamic shadows and keeps the intensity and size controls working.
Other builds haven't been tested. If the required uDWM symbol can't be
resolved, the mod logs the error and doesn't load.