---
id: "exponential-variance-shadow-maps"
title: "Exponential Variance Shadow Maps"
domain: "visibility"
stage: "visibility"
realtime: "realtime"
platforms: [webgl2, webgpu, desktop-gpu, mobile-gpu, unity, unreal, godot]
year_introduced: 2008
inputs: [depth]
outputs: [visibility-mask]
style: "both"
dynamic: "dynamic"
cost: "cheap"
authority: "2016"
url: "https://texelatlas.vercel.app/t/exponential-variance-shadow-maps/"
sources_verified_at: "2026-11-29"
---
# Exponential Variance Shadow Maps (2016)

> Warps depth through exponentials before storing moments, which drastically reduces the light bleeding of plain variance shadow maps while keeping the map filterable.

## Reach for it when

- variance shadow maps show light bleeding
- need prefilterable soft shadows with fewer artifacts
- blurred shadow maps leak light behind overlapping occluders
- want shadows that can be mipmapped and blurred on gpu

## How it works

EVSM applies the monotonic warps exp(c*z) and -exp(-c*z) to depth, then stores the first two moments of each warped value (four channels). Filtering happens in warped space, and at shade time Chebyshev's bound is evaluated on both the positive and negative warp, taking the minimum. The exponential stretches small depth differences so that occluders only slightly in front of a receiver are separated cleanly, which is what plain VSM cannot do. The constant c trades bleeding against precision: large values need 32-bit float storage to avoid overflow and quantisation, and a pure exponential variant (ESM) drops the variance and keeps one channel.

## When to use it

Choose it when you want blurrable soft shadows and plain VSM leaks too much, and your target supports float32 render targets. Prefer [Moment Shadow Maps](https://texelatlas.vercel.app/t/moment-shadow-maps.md) when you want a more principled bound with a cleaner artifact profile, [Variance Shadow Maps](https://texelatlas.vercel.app/t/variance-shadow-maps.md) when memory is tight, and [Percentage-Closer Filtering](https://texelatlas.vercel.app/t/percentage-closer-filtering.md) when robustness beats softness.

## Cost

cheap — Four 32-bit channels per texel; roughly 4x the bandwidth of a depth map before filtering.
Measured GPU Weight: 9.8× baseline (moderate) — 0.3225 ms median / 0.3328 ms p95 on Tesla T4/PCIe/SSE2 @ 1920x1080 (opengl-timer-query).
Ada L4 scaling: 10.13× baseline (moderate) — 0.1611 ms median (2× faster on L4).
Ampere A100 scaling: 6.5× baseline (moderate) — 0.1873 ms median (1.72× faster on A100).

## Failure modes

- Float precision or overflow at large exponent constants
- Residual bleeding with complex overlapping occluders
- Memory-heavy for many cascades or lights
- Banding or darkening if the exponent is tuned too aggressively

## Engine support

- unity: builtin — `HDRP Asset > Lighting > Shadows > Area Shadow Filtering Quality = Medium (EVSM)` (evidence: https://github.com/Unity-Technologies/Graphics/blob/557f6ac22b948284f57ffae6a789751fd1f63620/Packages/com.unity.render-pipelines.high-definition/Documentation~/HDRP-Asset.md, checked 2026-12-01) — HDRP only, used for area light shadows.

## Dataflow

- Inputs: depth
- Outputs: visibility-mask
- Platforms: webgl2, webgpu, desktop-gpu, mobile-gpu, unity, unreal, godot

## Presets

### Visibility behind two overlapping occluders (depth profile on top). White exact, orange VSM (light bleeds in the middle), cyan EVSM (glsl-fragment; rendered 2026-11-29)

```json
{
  "W": 0.09,
  "EC": 20,
  "TR": 1
}
```

```glsl
float hash(vec2 c){uvec2 u=uvec2(ivec2(floor(c)));uint h=u.x*1597334673u^u.y*3812015801u;h^=h>>15;h*=2246822519u;h^=h>>13;h*=3266489917u;h^=h>>16;return float(h)*(1./4294967296.);}
float lum(vec3 c){return dot(c,vec3(.2126,.7152,.0722));}
vec3 gam(vec3 c){return pow(clamp(c,0.,1.),vec3(1./2.2));}

const float W=0.09; // P
const float EC=20.0; // P
const float TR=1.0; // P
float mapD(float x){float d=1.;if(x>.12&&x<.45)d=min(d,.08);if(x>.4&&x<.78)d=min(d,.6);return d;}
float cheb(float mu,float m2,float t,float mv){float v=max(m2-mu*mu,mv);return t<=mu?1.:v/(v+(t-mu)*(t-mu));}
float exact(float x){return mapD(x)<TR-.01?0.:1.;}
float vsm(float x){float a=0.,b=0.;for(int i=0;i<41;i++){float d=mapD(x+(float(i)/40.-.5)*2.*W);a+=d;b+=d*d;}a/=41.;b/=41.;return cheb(a,b,TR-.01,1e-4);}
float evsm(float x){float p1=0.,p2=0.,q1=0.,q2=0.;
  for(int i=0;i<41;i++){float d=mapD(x+(float(i)/40.-.5)*2.*W);float e=exp(EC*(d-1.)),f=exp(-EC*d);p1+=e;p2+=e*e;q1+=f;q2+=f*f;}
  p1/=41.;p2/=41.;q1/=41.;q2/=41.;float t=TR-.01;
  return min(cheb(p1,p2,exp(EC*(t-1.)),1e-5),cheb(-q1,q2,-exp(-EC*t),1e-5));}
void mainImage(out vec4 fragColor,in vec2 fragCoord){
  vec2 u=fragCoord/iResolution.xy;float x=u.x;vec3 col=vec3(.07,.08,.11);
  if(u.y>.55){float d=mapD(x),yy=(u.y-.55)/.45;
    if(yy>1.-d*1.0+0.0&&d<.99)col=vec3(.25,.3,.4);
    if(d>.99&&yy>.97)col=vec3(.2,.2,.25);}
  float ph=.07+.36*(u.y)/.55*0.;
  float yb=u.y/.5;
  if(u.y<.5){
    float lo=.06,sc=.38;
    float y0=lo+sc*exact(x),y1=lo+sc*vsm(x),y2=lo+sc*evsm(x);
    float yy=u.y;
    col=mix(col,vec3(.9,.9,.9),smoothstep(.006,.002,abs(yy-y0)));
    col=mix(col,vec3(1.,.55,.2),smoothstep(.007,.003,abs(yy-y1)));
    col=mix(col,vec3(.3,.85,1.),smoothstep(.007,.003,abs(yy-y2)));
    if(abs(yy-lo)<.001||abs(yy-lo-sc)<.001)col=mix(col,vec3(.35),.6);
  }
  fragColor=vec4(col,1.);
}
```

Attribution: written for this index

## Lineage

- extends [Variance Shadow Maps](https://texelatlas.vercel.app/t/variance-shadow-maps.md)

## Sources

1. [primary] (2016) Variance Shadow Maps Light-Bleeding Reduction Tricks. GPU Pro 2. https://doi.org/10.1201/b11325-21 (verified via crossref on 2026-11-29)
2. [tutorial] Andrew Lauritzen Summed-Area Variance Shadow Maps. developer.nvidia.com. https://developer.nvidia.com/gpugems/gpugems3/part-ii-light-and-shadows/chapter-8-summed-area-variance-shadow-maps (verified via http on 2026-11-29)

## Cite this entry

Texel. "Exponential Variance Shadow Maps." https://texelatlas.vercel.app/t/exponential-variance-shadow-maps/ (accessed 2026-12-01).
