Skip to content

fx

Built-in effects over the picture: colour, blur, pixels, waves, glitches, bloom. No shader writing needed - set a number and it's there.

How to use it

fx is always there. Every effect is off at its default and nothing is computed while all of them are. They run while the song plays, never on the pause menu or the results. target says what they cover: everything, only the world, or the world without the fighters (the effect targets).

The player's "Fewer flashes" option (Options › MineFunkin › Accessibility) keeps invert and glitch at 0.3 and brightness at 1.3 at most.

Put them back with resetFx([duration]). Your own GLSL: shader. The whole picture: Effects.

Example code

-- The drop: the world goes grey and grainy, the notes stay sharp.
function onEvent(p)
    fx.target = "world"
    tween(fx.grayscale, 1, beats(1))
    fx.grain = 0.4
    after(beats(16), function() resetFx(beats(2)) end)
end

Properties

Property Kind Default
fx.grayscale number 0 0-1: colour drained.
fx.invert number 0 0-1: the colours turned inside out (0.5 = flat grey).
fx.sepia number 0 0-1: old photo.
fx.hue number 0 Degrees around the colour wheel.
fx.saturation number 1 0 = grey, 2 = twice as colourful.
fx.contrast number 1 0 = flat grey, 2 = hard.
fx.brightness number 1 0 = black, 2 = twice as bright.
fx.chromatic number 0 Red and blue pulled apart sideways, in pixels.
fx.blur number 0 Blur radius in pixels.
fx.pixelate number 0 Block size in pixels (from 2 up).
fx.wave number 0 The picture waves sideways, in pixels.
fx.glitch number 0 0-1: bands jump sideways and the colours split, flickering.
fx.scanlines number 0 0-1: CRT lines.
fx.grain number 0 0-1: film noise.
fx.bulge number 0 Fisheye: positive bulges the middle out, negative pinches it. Around ±0.5 is a lot.
fx.bloom number 0 0-1 and up: bright parts glow.
fx.target choice "screen" What they cover: "screen" (everything), "world" (the world only - the notes and HUD …

fx.grayscale

number fx.grayscale = 0

0-1: colour drained.

fx.invert

number fx.invert = 0

0-1: the colours turned inside out (0.5 = flat grey).

fx.sepia

number fx.sepia = 0

0-1: old photo.

fx.hue

number fx.hue = 0

Degrees around the colour wheel.

fx.saturation

number fx.saturation = 1

0 = grey, 2 = twice as colourful.

fx.contrast

number fx.contrast = 1

0 = flat grey, 2 = hard.

fx.brightness

number fx.brightness = 1

0 = black, 2 = twice as bright.

fx.chromatic

number fx.chromatic = 0

Red and blue pulled apart sideways, in pixels.

fx.blur

number fx.blur = 0

Blur radius in pixels.

fx.pixelate

number fx.pixelate = 0

Block size in pixels (from 2 up).

fx.wave

number fx.wave = 0

The picture waves sideways, in pixels.

fx.glitch

number fx.glitch = 0

0-1: bands jump sideways and the colours split, flickering.

fx.scanlines

number fx.scanlines = 0

0-1: CRT lines.

fx.grain

number fx.grain = 0

0-1: film noise.

fx.bulge

number fx.bulge = 0

Fisheye: positive bulges the middle out, negative pinches it. Around ±0.5 is a lot.

fx.bloom

number fx.bloom = 0

0-1 and up: bright parts glow.

fx.target

choice fx.target = "screen"

What they cover: "screen" (everything), "world" (the world only - the notes and HUD stay sharp) or "terrain" (the world without the fighters). The last two need a fight.

One of: "screen", "world", "terrain" (what they do).