- Documentation
- Client functions
- getPostEffect
Function
getPostEffect
Returns the value of an image effect set with setPostEffect or by the server (the colour filter as "tint", grain as "grain").
Syntax
float... getPostEffect(string name)Arguments
namestring- The effect name.
Returns
The value (for "tint" three numbers 0-255, for colour effects four: r, g, b, overall) or false when the effect has the game default.
Example
local exposure = getPostEffect("exposure")
outputChatBox("Ekspozycja: " .. tostring(exposure or 0))
See also
setPostEffectSets an image effect for this player, computed by the game engine over the whole world image (without script texts and windows). The effect stays untilresetPostEffector 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).resetPostEffectRemoves one image effect set withsetPostEffect. If the server also sets this effect (colour filter, grain), the server value comes back.