Skip to main content

PostProcess

Contains functions for customizing and controlling post-process effects.

Functions

setBloom(target, threshold, intensity, scatter, tint, clamp)

Customizes the bloom effect.

Parameters

  • target Either the target Player, client ID of the target player, or Players.All to target all players.
  • threshold A number to set level of brightness used to filter out pixels.
    • Min: 0
    • Max: 4
  • intensity A number to control the strength of the effect.
    • Min: 0
    • Max: 1000
  • scatter A number to set the bloom scatter, used to calculate distortion in the effect.
    • Min: 0
    • Max: 1
  • tint A Color to set a tint to apply to the effect.
  • clamp A number to control the amount of bloom.
    • Min: 0
    • Max: 10

Example

Set a red bloom effect.

function onStart()
PostProcess.setBloom(Players.All, 1, 10, 1, Color.red, 10)
end
Result

resetBloom(target)

Resets the bloom effect to default value.

Parameters

  • target Either the target Player, client ID of the target player, or Players.All to target all players.

Example

Reset bloom after 2 seconds.

function onStart()  
PostProcess.setBloom(Players.All, 1, 10, 1, Color.red, 10)
Task.wait(2)
PostProcess.resetBloom(Players.All)
end
Result

setVignette(target, color, intensity, smoothness, rounded)

Customizes the vignette effect.

Parameters

  • target Either the target Player, client ID of the target player, or Players.All to target all players.
  • color A Color to set a tint color to apply to the effect.
  • intensity A number to control the strength of the effect.
    • Min: 0
    • Max: 1
  • smoothness A number to set the smoothness of the vignette borders.
    • Min: 0
    • Max: 1
  • rounded A boolean that controls whether the vignette is perfectly round or dependent on the screen aspect-ratio.

Example

Apply a vignette effect.

function onStart()
PostProcess.setVignette(Players.All, {0,0,0}, 0.5, 0.5, true)
end
Result

resetVignette(target)

Resets the vignette effect to default value.

Parameters

  • target Either the target Player, client ID of the target player, or Players.All to target all players.

Example

Apply a vignette effect, and reset after 2 seconds.

function onStart()
PostProcess.setVignette(Players.All, {0,0,0}, 0.5, 0.5, true)
Task.wait(2)
PostProcess.resetVignette(Players.All)
end
Result

setColorAdjustments(target, contrast, colorFilter, hueShift, saturation)

Customizes the color adjustments effect.

Parameters

  • target Either the target Player, client ID of the target player, or Players.All to target all players.
  • contrast A number to control the overall range of tonal values.
    • Min: -100
    • Max: 100
  • colorFilter A Color to set a tint to apply to the effect.
  • hueShift A number to shift the hue of all colors.
    • Min: -180
    • Max: 180
  • saturation A number to control the intensity of all colors.
    • Min: -100
    • Max: 100

Example

Change color adjustments. This will create a spooky looking world.

function onStart()
local grayColor = Color.new(180,180,180)
PostProcess.setColorAdjustments(Players.All, 0, grayColor, 0, -100)
end
Result

resetColorAdjustments(target)


setChromaticAbberation(target, intensity)

Customizes the chromatic abberation effect.

Parameters

  • target Either the target Player, client ID of the target player, or Players.All to target all players.
  • intensity A number to set the strength of the effect.
    • Min: 0
    • Max: 1

Example

Apply the chromatic abberation effect.

function onStart()
PostProcess.setChromaticAbberation(Players.All, 1)
end
Result

resetChromaticAbberation(target)

Resets the chromatic abberation effect to default value.

Parameters

  • target Either the target Player, client ID of the target player, or Players.All to target all players.

Example

Reset the chromatic abberation effect after 2 seconds.

function onStart()
PostProcess.setChromaticAbberation(Players.All, 1)
Task.wait(2)
PostProcess.resetChromaticAbberation(Players.All)
end
Result

setLensDistortion(target, intensity, xMultiplier, yMultiplier, center, scale)

Customizes the lens distortion effect.

Parameters

  • target Either the target Player, client ID of the target player, or Players.All to target all players.
  • intensity A number to set the strength of the effect.
    • Min: -1
    • Max: 1
  • xMultiplier A number to control the intensity multiplier on the X axis. Set to 0 to disable distortion on this axis.
    • Min: 0
    • Max: 1
  • yMultiplier A number to control the intensity multiplier on the Y axis. Set to 0 to disable distortion on this axis.
    • Min: 0
    • Max: 1
  • center A Vector2 to control the center point of the distortion effect.
  • scale A number to control the scale of the distortion effect.
    • Min: 0
    • Max: 5

Example

Apply a distortion effect.

function onStart()
PostProcess.setLensDistortion(Players.All, 0.2, 1, 1, Vector2.new(0,0), 2)
end
Result

resetLensDistortion(target)

Resets the lens distortion effect to default value.

Parameters

  • target Either the target Player, client ID of the target player, or Players.All to target all players.

Example

Reset a distortion effect after 2 seconds.

function onStart()
PostProcess.setLensDistortion(Players.All, 0.2, 1, 1, Vector2.new(0,0), 2)
Task.wait(2)
PostProcess.resetLensDistortion(Players.All)
end
Result

setFilmGrain(target, filmGrainType, intensity, response)

Customizes the film grain effect.

Parameters

  • target Either the target Player, client ID of the target player, or Players.All to target all players.
  • filmGrainType Sets the type of FilmGrainLookup used in the effect.
  • intensity A number to set the strength of the effect.
    • Min: 0
    • Max: 1
  • response A number to set control the noisiness of the effect.
    • Min: 0
    • Max: 1

Example

Apply the film grain to all players.

function onStart()
PostProcess.setFilmGrain(Players.All, FilmGrainLookup.Thin1, 1, 0)
end
Result

resetFilmGrain(target)

Resets the film grain effect to default value.

Parameters

  • target Either the target Player, client ID of the target player, or Players.All to target all players.

Example

Reset film grain after 2 seconds.

function onStart()
PostProcess.setFilmGrain(Players.All, FilmGrainLookup.Thin1, 1, 0)
Task.wait(2)
PostProcess.resetFilmGrain(Players.All)
end
Result

Enums

FilmGrainLookup

  • Thin1 value = 0
  • Thin2 value = 1
  • Medium1 value = 2
  • Medium2 value = 3
  • Medium3 value = 4
  • Medium4 value = 5
  • Medium5 value = 6
  • Medium6 value = 7
  • Large01 value = 8
  • Large02 value = 9
  • Custom value = 10