-
Notifications
You must be signed in to change notification settings - Fork 19
Post Process Effects
A scene may have one or more post process effects added to it, which are applied to the entire output at render time.
Post processes generally apply some sort of colour transformation effect, a selection of which can be found included
in xygine/graphics/postprocesses/
such as bloom, chromatic abberation and old film stock. To add a post process to
a scene first include the relevant header file, then use:
m_scene.addPostProcess<MyPostProcess>();
where MyPostProcess
is the type of effect required. Multiple post processes can be added to a single scene and will
be applied in the order in which they were added. Adding a lot of post process effects may detrimentally affect
perfomance however.
If it is preferred that post processes are not applied to the entire output, for example the HUD or UI should remain unaffected, then said UI should be implemented in a second scene which does not have any post process effects added. This scene can then be drawn after the first scene, which has already had the post processes applied.
To create a custom post process effect it is required to inherit the PostProcess interface, and implement the pure virtual functions.
TODO tutorial on implementing a post process