> For the complete documentation index, see [llms.txt](https://morningheartgames.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://morningheartgames.gitbook.io/docs/asyncautoexposure/introduction/readme.md).

# Overview

Async Auto Exposure is a Unity plugin that corrects brightness for live textures without putting a synchronous GPU readback on the main thread.

It is built for webcam previews, video playback, UI textures, sprites, and masked foreground workflows where the source can move between very dark and very bright lighting. The runtime component downsamples the input, measures luminance with `AsyncGPUReadback`, eases the exposure multiplier over time, and returns a corrected `RenderTexture`.

## What It Includes

| Area              | Included                                                                        |
| ----------------- | ------------------------------------------------------------------------------- |
| Runtime component | `AsyncAutoExposure` for script-driven texture processing                        |
| UI components     | `AutoExposureRawImage` and `AutoExposureImage`                                  |
| Masking           | `ProcessTextureWithMask()` for foreground-only metering                         |
| Alpha handling    | Transparent UI pixels can be ignored during brightness analysis                 |
| Editor tooling    | Brightness Calculator, Brightness Adjustment, and a custom Inspector            |
| Samples           | Webcam, advanced controls, masked source, video player, and UI component scenes |

## Good Fits

* Webcam apps with changing room light
* VTuber, streaming, AR, and virtual try-on tools
* Backlit player or subject previews
* Video player UI and cutscene previews
* QR, barcode, industrial, or medical image feeds that need stable brightness
* Sprite and UI preview pipelines where transparent padding should not affect exposure

## Start Here

| Goal                                     | Page                                                                                 |
| ---------------------------------------- | ------------------------------------------------------------------------------------ |
| Add the plugin to a scene quickly        | [Getting Started](/docs/asyncautoexposure/introduction/getting-started.md)           |
| Understand the exposure pipeline         | [Core Concepts](/docs/asyncautoexposure/introduction/core-concepts.md)               |
| Choose between runtime and UI components | [Component Guide](/docs/asyncautoexposure/runtime-usage/component-guide.md)          |
| Look up public methods and properties    | [API Reference](/docs/asyncautoexposure/runtime-usage/api-reference.md)              |
| Tune speed and platform cost             | [Performance Guide](/docs/asyncautoexposure/tools-and-shipping/performance-guide.md) |
| Fix common setup issues                  | [Troubleshooting](/docs/asyncautoexposure/tools-and-shipping/troubleshooting.md)     |

## Requirements

* Unity 2018.2 or newer
* Shader Model 3.0 or newer
* RenderTexture support on the target platform
* `AsyncGPUReadback` support for the normal async path

WebGL uses a synchronous fallback because native async GPU readback is unavailable there.

## Package Layout

```
Assets/AsyncAutoExposure/
  Runtime/
    Scripts/
    Resources/Shaders/
  Editor/
  Samples/
  Documentation/

Assets/GitBook_AsyncAutoExposure/
  README.md
  SUMMARY.md
  *.md
```

The `GitBook_AsyncAutoExposure` folder is organized as a GitBook/GitHub Sync documentation root. `README.md` is the landing page and `SUMMARY.md` defines the navigation.
