> 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/tools-and-shipping/troubleshooting.md).

# Troubleshooting

## The Image Is Still Too Dark

Try:

* Increase `targetBrightness`
* Increase `maxExposure`
* Lower `downsampleFactor` for more accurate analysis
* Use a mask so the subject drives exposure instead of the whole frame

## The Image Becomes Too Bright

Try:

* Lower `targetBrightness`
* Lower `maxExposure`
* Increase `adjustmentSpeed` only if the response feels too slow
* Use a mask to ignore bright or dark background regions

## Exposure Changes Too Slowly

Try:

* Increase `adjustmentSpeed`
* Lower `readbackFrameSkip`

## Exposure Flickers

Try:

* Lower `adjustmentSpeed`
* Increase `readbackFrameSkip`
* Increase `downsampleFactor`
* Use a foreground mask for unstable backgrounds

## Shader Cannot Be Found

The default shader is loaded from:

```
Resources/Shaders/AutoExposure
```

Keep the bundled shader at:

```
Assets/AsyncAutoExposure/Runtime/Resources/Shaders/AutoExposure.shader
```

If you reorganize files, assign the shader manually in the `Auto Exposure Shader` field.

## RawImage Does Not Update

Check:

* `Enable Auto Exposure` is enabled
* `Continuous Update` is enabled for webcam or video content
* The `RawImage` has a valid source texture
* The GameObject is active
* Another script is not immediately replacing `RawImage.texture` after auto exposure runs

## Image Component Looks Incorrect

Check:

* The Image has a valid sprite
* `Output Raw Image` is assigned
* The output `RawImage` is enabled and visible
* Alpha handling is configured correctly

If `Consider Alpha Channel` is enabled for `AutoExposureImage`, the sprite texture must be readable because the component reads alpha values on the CPU.

## Masked Exposure Does Not Change

Check:

* The mask texture is assigned.
* White mask regions overlap the pixels you want to meter.
* The mask is not entirely black or below the internal threshold.
* You are calling `ProcessTextureWithMask()`, not `ProcessTexture()`.

If no mask pixels pass the threshold, the component keeps the previous exposure target.

## Output Is Null

`ProcessTexture()` and `ProcessTextureWithMask()` return `null` when required inputs are missing or the material was not created.

Check:

* Source texture is not `null`.
* Mask texture is not `null` for masked processing.
* `AutoExposure.shader` can be loaded or is assigned manually.

## Webcam Starts As A Tiny Or Black Texture

`WebCamTexture` can report placeholder dimensions before the first real frame arrives. Wait until the webcam is playing and reports a real width before relying on processed output.

The sample scripts treat widths below `32` as not ready yet.

## Texture Is Not Readable In Editor Tools

The Brightness Calculator and Brightness Adjustment tools can enable Read/Write for project textures when needed.

For runtime `AutoExposureImage` alpha-aware sprite metering, enable Read/Write manually or disable `Consider Alpha Channel`.

## WebGL Performance Is Lower

This is expected. WebGL uses a synchronous fallback because `AsyncGPUReadback` is not available in the same way as native platforms.

Increase `downsampleFactor` and `readbackFrameSkip` for WebGL builds.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://morningheartgames.gitbook.io/docs/asyncautoexposure/tools-and-shipping/troubleshooting.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
