# OverlayFX System

## Overview

* Includes multiple built-in OverlayFX effects with scriptable dynamic control
* Easily apply/remove effects on target objects without custom logic
* Supports user-defined custom OverlayFX integration
* System Goal: Simple to use and highly extensible
* Visual Goal: Diverse and eye-catching effects

## Built-in Effects

* Fresnel
* Outline
* Tint
* Holographic
* TextureFlow

## Pairs with Bloom

* Can be used with URP Post-Processing Bloom
* Allows you to achieve a brilliant, glowing look with overflowing light effects

## Usage

* Add OverlayFXSettings preset to scene (system uses this to reference Overlay materials)
* Control via OverlayFXManager.instance APIs:
  * Apply effect: OverlayFXManager.instance.ApplyOverlay(target, overlayName);
  * Remove effect: OverlayFXManager.instance.RemoveOverlay(target, overlayName);
* See OverlayFXSystemExample.cs for implementation samples

## Custom Effects Support

* Setup: Drag custom Overlay materials into OverlayFXSettings' OverlayMaterials list
* Usage: Call OverlayFXManager.instance.ApplyOverlay(targetObject, materialName)

<figure><img src="https://1015306288-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5TKI5zdwMx1bXFiVnBUe%2Fuploads%2F5tl7DAcVOmAuubw5WR7Q%2F%E5%9B%BE%E7%89%871.png?alt=media&#x26;token=bd7d39b7-fdc4-4153-951c-051c9d77d1d0" alt=""><figcaption></figcaption></figure>

## Performance Tips

* Mobile-friendly
* Best for highlighting a few key objects
* Avoid using on a large number of objects
* Suggest turning off Bloom for low-spec configurations

## Limitations

* Doesn't support models with multiple sub-meshes

## Enjoying this package? <a href="#jifd-1756995944057" id="jifd-1756995944057"></a>

* Give it a quick rating or leave a short review on the Unity Asset Store.
* Your feedback helps us improve and add even more features!
* [Review on Unity Asset Store](https://assetstore.unity.com/packages/slug/327691)


---

# Agent Instructions: 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://graphicscat.gitbook.io/graphicscat/documentation/overlayfx-system.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.
