> ## Documentation Index
> Fetch the complete documentation index at: https://dacruzdev.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Transparent Background Capture in ScreenshotKit

> Capture screenshots with a transparent background using CapturePostProcessTransparent, with optional matte passes in a single call.

## Usage

```csharp theme={null}
using DaCruz.ScreenshotKit;

var alphaSource = ScreenshotCapture.TransparentAlphaSource.Hybrid;
var result = ScreenshotCapture.CapturePostProcessTransparent(sourceCamera, settings, alphaSource);

// Or with mattes alongside:
var fullResult = ScreenshotCapture.CapturePostProcessTransparentWithMattes(
    sourceCamera, settings, alphaSource
);
```

## Alpha sources

`TransparentAlphaSource` has three values, matching the window's **Alpha Source** dropdown:

| Value             | Alpha comes from                                                        |
| ----------------- | ----------------------------------------------------------------------- |
| `CryptomatteOnly` | The Cryptomatte alpha pass. Sharp geometry edges, no bloom in alpha.    |
| `PostProcessOnly` | A dual render over black and white; captures bloom and flares in alpha. |
| `Hybrid`          | `max(Cryptomatte, PostProcess)`: sharp edges plus post-process glow.    |

The setting field on `ScreenshotSettings` is `ppAlphaSource` if you would rather pull it from the asset.

<Note>
  If Cryptomatte alpha is not available on the active render pipeline, `Hybrid` falls back to `PostProcessOnly` and logs a warning.
</Note>

<Tip>
  Save as **PNG**, **TGA**, or **EXR**; JPEG has no alpha channel.
</Tip>

## See also

* [Transparent PNG workflow](/workflows/transparent-png) for the editor-window equivalent and mode guidance.
