Post Processing #1333
ogniK5377
announced in
Announcements
Post Processing
#1333
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
We have reworked the post-processing system. The post-processing system now uses a layer-based stack so you can layer post-processing effects on top of each other. With this, we also have introduced a breaking change by the removal of the
render.postprocess
event.Post Processing Stack
We introduce a new field in the global game namespace called
PostProcess
. This is how you can add and remove your post-processing effects as well as fetch them to change settings. These are all functions that can only be run on the client!Standard post-processing shader
We have introduced a standard post-processing shader that includes a list of many different common effects people might want to use for post-processing. The list is as follows:
Adding the standard post-processing shader can be done as follows:
Enabling an effect and setting its settings can be done like so:
Creation of new post-processing effects
We have shipped an example post-processing shader that inverts the colors of your screen. You can find this in
addons/base/shaders/postprocess_example.vfx
There are two types of post-processing effects you can create, you can create a basic post-processing effect that just draws a quad on the user's screen using your provided shader(99% of custom post-processing effects will do this), or you can create a post-processing effect which handles the rendering yourself.
For most post-processing shaders, you will just use
MaterialPostProcess
. An example can be seen below:Manually Creating Post-Processing Effects
And usage:
Layering
Since we use a stack/layers. This means you can do post-processing in passes.
In this instance, our standard post-processing will modify the output color, that modified output is then passed to
MyPostProcessEffect
to do its magic. By doing this, the post-processing effects aren't overwriting each other and instead work together.Beta Was this translation helpful? Give feedback.
All reactions