Skip to content

Post Effect

Applies its Material shader to the whole screen: built-in vignette, CRT, pixelate, chromatic aberration, or your own. Several chain in order.

Type: PostEffectNode · Category: Graphics & Rendering · Also found as: posteffect, post_effect

A Post Effect’s settings are its Material (Inspector > Material): the shader applied to the whole screen and its parameters. Built-in shaders: builtin:vignette (the default), builtin:crt, builtin:pixelate, builtin:chromatic, builtin:grayscale, builtin:wave, builtin:flash, builtin:dissolve, builtin:outline, builtin:passthrough - or a .fs fragment shader of your own.

Several post effects chain in tree order; disable one (its enabled toggle) to skip it. A hit flash, for example:

-- On the player, with a PostEffect child named "Flash" (builtin:flash), disabled.
function Player:hurt()
self.flash = self.node:get_node("Flash")
self.flash.enabled = true
self.flash_left = 0.1 -- seconds
end
function Player:update(dt)
if self.flash_left then
self.flash_left = self.flash_left - dt
if self.flash_left <= 0 then
self.flash.enabled = false
self.flash_left = nil
end
end
end

No reflected properties of its own: its settings are described above.

Plus the common properties every node has.

{
"type": "PostEffectNode",
"name": "PostEffect",
"position": [
0,
0
]
}