Auto Exposure is the perfect solution for Unity URP users looking for an easy way to add eye adaptation to their scenes. This powerful asset automatically brightens or darkens your scene view to recreate the function of eye adaptation, which adjusts to both very dark and very bright areas. Fully integrated with the Volume Component System, Auto Exposure is easy to use and customize, with full source code access included. With support for procedural radial masks and input textures, this asset is perfect for creating realistic and immersive experiences. Plus, with our commitment to customer satisfaction, you can trust that we'll be there to support you every step of the way. Try Auto Exposure today and see the difference it can make in your Unity URP projects!
- Add the Auto Exposure Render Feature to your Universal Renderer Data asset.
- Click on your Camera, ensure the Post Processing checkbox is toggled on.
- In the Scene or Hierarchy view, select a Game Object that contains a volume component to view it in the Inspector.
- Click 'Add Override'
- Select Post-processing / AutoExposure
- Configure the Auto Exposure effect from the Volume Profile.
You can also assign the Auto Exposure effect to Local Box and Sphere Volumes in the same way you would with any other built-in URP post-processing effect.
- Your camera will always use the Instant adaptation mode in Scene View and in Game View (when not in Play mode).
- You can customize how the camera weights luminance values using procedural radial masks or using your own input textures.
- Ensure that you have added the Auto Exposure Render Pass to your Universal Renderer Data.
- Ensure that your camera has Post Processing enabled.
- Ensure that your Volume Profile has the Auto Exposure override added, and that the override's Mode is set to On.
Frequently Asked Questions
Everything you need to know about this asset.
No FAQs found yet.
Still have questions? Ask in our Discord.
Does Auto Exposure work on WebGL?
- Yes. Auto Exposure offers a Fragment Shader option to ensure compatibility with WebGL and other platforms that do not support the default Compute Shader method for Auto Exposure.
Is Auto Exposure integrated into the Volume Component System?
- Yes. Auto Exposure is fully integrated with Unity URP's Volume Component System. It's great. It looks and feels like it's one of Unity's built-in volume overrides.
Is Auto Exposure compatible with Forward and Deferred Render Paths?
- Yes. This asset is compatible with both Forward & Deferred Render Paths.
Is Auto Exposure compatible with VR?
- Yes. The Compute mode is compatible with VR Multipass. The Fragment mode is compatible with both Multipass and Single-Pass Instanced rendering.
What is an Exposure Curve?
- Exposure curves let you set an additional exposure compensation value based on the scene's exposure. This enables you to conditionally over- or under-expose your scene based on your scene's brightness.
- You can set the Exposure Curve from the Auto Exposure settings within your Volume.
- The Exposure Curve is clamped to a range of [-3, +3] EVs. This equates to a limitation of 8x darker or 8x brighter. Note that you can also use the separate exposure compensation to exceed these limitations.
How does Auto Exposure work?
- We use a Compute Shader to sample each pixel on screen and then evaluate the luminance of the pixel,
- We then use these results to estimate the total screen luminance accounting for your metering mask (which lets you input a texture or radial falloff mask to control the weighting of the samples).
- Then, we convert the total average luminance to EV units.
- We use these EV units to determine the target EV for this frame based on your configuration.
- Then, we return back an Exposure value. We use a single exposure value across the entire screen to adjust the screen pixel brightness to give a result consistent with your target EV.
Sounds complicated! Is Auto Exposure performance-intensive?
- No. The compute shader approach allows us to execute the bulk of this process in parallel so that the resulting performance hit is minor.
What options can I control?
- We've exposed the following properties. All of these properties can be changed during runtime via the Volume Component System API.
- Mode (Enabled / Disabled)
- Lower Bound
- Upper Bound
- Fixed Compensation
- Compensation Curve (x: [Lower Bound, Upper Bound], y: [-3, +3])
- Adaptation Mode (Progressive, Instant)
- Dark to Light Speed
- Light to Dark Speed
- Metering Mask Mode (Textural, Procedural)
- Metering Mask Texture
- Metering Procedural Falloff