Skip to main content

Auto Exposure Shader

Eric Williams
I make stuff

Wide pixel banner image! 1500x500, 750x250 for Projects.

The description on the blog list page.

Content

git track fix

The content of the post about Auto Exposure! Don't forget clips of broken versions.

URP = Universal Render Pipeline
HDRP = High Definition Render Pipeline
HDR = High Dynamic Range

Working in HDRP the renders are cool but the framerate in URP is very good. Adaptive Probe Volumes give good frame rate and are fine for time of day with static meshes.

In order to get similar visuals as HDRP in URP the light brightness has to be bumped up significantly. To get similar values I exported HDR images at different light levels from both pipelines and compared the pixel values.

The table below compares the different light units you can use in HDRP with the Intensity value that closest matches for URP.

The first table for point light and spot light, the second table for dirctional light.

Point and Spot

Unity LabelsApproximate itemsIntensity(Urp)LumenCandelaLux at 1mEv100
Darkness.0001000-infinity
CandleSuper Moon (.25Lux).1757.5.596.5962.255
Bright Candle.35151.191.193.26
DecorativeChristmas Tree Light3.675157.512.5312.536.647
40Watt Incandescent730023.8732.877.58
Interior100Watt Incandescent381650131.4131.410.04
Street Light70300023923910.9
ExteriorSuper Led Flashlight535215001711171113.74
Small Stadium Light1000400003183318314.64

Directional

Unity LabelsApproximate itemsIntensity(Urp)LumenCandelaLuxEv100
Darkness.00010
MoonSuper Moon (.25Lux).15.5
.31
Low Sun15005000
300010000
Cloudy1350045000
2400080000
High SunDefault Sun 100k30k ~ 100k Lux105000
40000130000

Using these tables I could grab the values from lights in HDRP and set the "close enough" values in URP.

The next thing I did was create a script that you could toss onto lights that would allow you to set the different light units and the script would automatically set the matching light intensity.

Next it would be nice to have a way to handle the exposure.. automatically.

Software used:

  • Hlsl
  • Compute
  • Unity

External resources for this specific post:

  • Gumroad for downloads
  • Other Resources?

Related: wip, wip

Leave Feedback

Like!

Share!

Comment!