ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Client functions
  3. setPostEffect

Function

setPostEffect

ClientWorldTrilogy Hub only

Sets an image effect for this player, computed by the game engine over the whole world image (without script texts and windows). The effect stays until resetPostEffect or leaving the server. Available effects: "saturation" (0-2, 1 = unchanged, 0 = black and white), "contrast" (0-2), "gamma" (0.1-4), "gain" (colour brightness gain, 0-4), "offset" (colour offset, -1-1, 0 = unchanged), "tint" (image tint: r, g, b 0-255), "temperature" (white temperature in kelvins, 1500-15000, 6500 = neutral), "grain" (grain 0-1), "grainJitter" (grain jitter 0-1), "vignette" (darkened edges 0-1), "bloom" (glow of bright areas 0-8), "fringe" (colour fringing at the edges 0-5), "exposure" (-8-8, 0 = unchanged, +1 = twice as bright).

Syntax

bool setPostEffect(string name, float value)

Arguments

namestring
The effect name.
valuefloat
The effect value. For "saturation", "contrast", "gamma", "gain" and "offset" one number changes the whole image, and three or four (r, g, b[, overall]) each colour separately. For "tint" three numbers r, g, b.

Returns

true on success, false for an unknown effect or a value out of range.

Example

-- wspomnienie: czarno-bialy obraz z ziarnem i ciemnymi brzegami
setPostEffect("saturation", 0)
setPostEffect("grain", 0.4)
setPostEffect("vignette", 0.8)
setTimer(resetPostEffects, 10000, 1)

Notes

Depends on the player's graphics. At the lowest effects (post-process) quality the game does not draw grain or darkened edges. The other effects always work.

See also