engineAddPostProcess
Client
Turns on a post process on the screen: a material whose shader is #type post.
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
local shader = engineCreateShader("shaders/vignette.shader")
local vignette = engineCreateMaterial(shader)
engineSetMaterialValue(vignette, "strength", 0.6)
engineAddPostProcess(vignette, 10)NoteA material whose shader is not a post shader is an error.