Auto Exposure Shader
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 Labels | Approximate items | Intensity(Urp) | Lumen | Candela | Lux at 1m | Ev100 |
|---|---|---|---|---|---|---|
| Darkness | .0001 | 0 | 0 | 0 | -infinity | |
| Candle | Super Moon (.25Lux) | .175 | 7.5 | .596 | .596 | 2.255 |
| Bright Candle | .35 | 15 | 1.19 | 1.19 | 3.26 | |
| Decorative | Christmas Tree Light | 3.675 | 157.5 | 12.53 | 12.53 | 6.647 |
| 40Watt Incandescent | 7 | 300 | 23.87 | 32.87 | 7.58 | |
| Interior | 100Watt Incandescent | 38 | 1650 | 131.4 | 131.4 | 10.04 |
| Street Light | 70 | 3000 | 239 | 239 | 10.9 | |
| Exterior | Super Led Flashlight | 535 | 21500 | 1711 | 1711 | 13.74 |
| Small Stadium Light | 1000 | 40000 | 3183 | 3183 | 14.64 |
Directional
| Unity Labels | Approximate items | Intensity(Urp) | Lumen | Candela | Lux | Ev100 |
|---|---|---|---|---|---|---|
| Darkness | .0001 | 0 | ||||
| Moon | Super Moon (.25Lux) | .15 | .5 | |||
| .3 | 1 | |||||
| Low Sun | 1500 | 5000 | ||||
| 3000 | 10000 | |||||
| Cloudy | 13500 | 45000 | ||||
| 24000 | 80000 | |||||
| High Sun | Default Sun 100k | 30k ~ 100k Lux | 105000 | |||
| 40000 | 130000 |
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?
Comment!