# engineAddPostProcess (Client)

> Turns on a post process on the screen: a material whose shader is `#type post`.

- **Platform**: MY Multiplayer (MYMP)
- **Kind**: Lua Function
- **Side**: Client
- **Category**: Materials and shaders
- **URL**: https://wiki.mymp.gg/en/engineAddPostProcess

## Syntax

```lua
bool engineAddPostProcess(material material [, int priority = 0])
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `material` | `material` | The material, with a post shader. |
| `priority` | `int` | The order among the post processes at the same point of the frame: lower priorities run first. Calling again with another priority moves it. *(default: `0`)* |

## Returns

`true` when it was turned on, or when it already was with the same priority.

## Example

```lua
local shader = engineCreateShader("shaders/vignette.shader")
local vignette = engineCreateMaterial(shader)
engineSetMaterialValue(vignette, "strength", 0.6)
engineAddPostProcess(vignette, 10)
```

### Note

A material whose shader is not a post shader is an error.

## See also

- [engineRemovePostProcess (Client)](https://wiki.mymp.gg/en/engineRemovePostProcess.md): Turns off a post process this resource turned on with engineAddPostProcess.
- [engineGetPostImage (Client)](https://wiki.mymp.gg/en/engineGetPostImage.md): Gives the image a post process step produces, to draw it or use it in another material.
- [engineCreateMaterial (Client)](https://wiki.mymp.gg/en/engineCreateMaterial.md): Creates a material: a shader with parameter values, which then replaces or overlays the materials of models.
- [engineCreateShader (Client)](https://wiki.mymp.gg/en/engineCreateShader.md): Creates a shader from a .shader file or from its source text. The shader compiles in the background.
