Generator node

Invert Image

Turns any incoming texture into its photographic negative in a single GPU pass. Amount blends continuously between the original and the full negative, so inversion can be animated by an LFO, an audio band, or an EEG signal, and an optional alpha inversion flips coverage so that transparent areas become solid. It is a universal 1:1 image filter — it accepts the Image output of any generator, including live sources like Camera Input, Video Player, and Liquid Simulation.

Inputs

PortTypeDefault
ImageThe picture to invert. Connect any generator, camera, video or filter texture.image—
EnableOff passes the source through untouched.booltrue
AmountBlends between the original and the full negative. Clamped to 0…1; cable an LFO here for breathing inversion.float1.0
Invert AlphaAlso flips coverage, so transparent areas become opaque and the silhouette turns inside out. Off keeps transparency as it was.boolfalse

Outputs

PortType
ImageThe picture to invert. Connect any generator, camera, video or filter texture.image
Widthfloat
Heightfloat

Live Preview

Interactive — Color inversion, split live

How It Works

Invert Image is a pass-through filter node: it takes an image on its Image input port, renders one fullscreen triangle over the upstream texture, and writes the result to its own offscreen texture, which it exposes on its Image output. Nothing is composited to screen here — the output still needs a Canvas node.

Because Grafit generator textures are stored premultiplied, a naïve 1 − rgb would brighten transparent regions into grey haze. The shader therefore does the mathematically correct thing per pixel:

  1. Un-premultiply — rgb = a > 0.001 ? rgb / a : 0
  2. Invert and blend — outRGB = mix(rgb, 1 − rgb, Amount)
  3. Alpha — a = Invert Alpha ? mix(a, 1 − a, Amount) : a
  4. Re-premultiply — the returned color is float4(outRGB × a, a)

So with Invert Alpha off, transparent pixels stay perfectly transparent and only visible color is negated. With Invert Alpha on, the coverage itself is inverted — what was solid becomes empty and what was empty becomes solid — which turns any shape into its own inverted stencil.

Amount is clamped to 0…1 and interpolates linearly:

AmountResult
0.0Original image, untouched
0.5Fully desaturated-looking midpoint (each channel pulled halfway to 0.5)
1.0Full photographic negative

The node is flagged as always-dynamic and it keeps its source rendered even when that source isn't on a Canvas of its own — so you can chain a generator straight into Invert Image without also having to composite the original, and live inputs (camera, video, fluid sims) update every frame.

The Width and Height outputs pass the upstream generator's dimensions straight through (falling back to 2.0 × 2.0 if nothing is connected), so the filter is transparent to any downstream node that needs the source's footprint. When Enable is false, or when no image source is connected, no pass is drawn and the output texture is left cleared.

Parameters in Depth

PortTypeDefaultMeaning
ImageImage—The texture to invert. Connect the Image output of any generator (Circle 2D, Text as Image, Image, Camera Input, Video Player, Liquid Simulation, Particle System, …). Nothing connected = nothing rendered.
EnableBooltrueMaster switch. Off skips the pass entirely; the output stays cleared.
AmountFloat1.0Blend between original (0) and full negative (1), clamped to 0…1. Cable-drivable for animated inversion.
Invert AlphaBoolfalseAlso inverts the alpha channel, flipping opaque and transparent regions. Off (default) keeps the source's coverage intact.

Interactions: Amount drives both the color and the alpha inversion, so with Invert Alpha on, a mid Amount gives a half-solid, half-transparent wash rather than a clean stencil — use Amount at 1.0 when you want a crisp inverted mask.

Use Cases

  • Beat-synced negative flash — Audio Beat Detection → Amount for a strobing full-frame inversion on every kick.
  • Breathing color reversal — LFO (0…1) → Amount across a slow cycle so a video or camera feed melts in and out of negative.
  • Live camera negative — Camera Input → Invert Image → Canvas for an instant X-ray/darkroom look on a performer.
  • Inverted stencil from a shape — Circle 2D → Invert Image with Invert Alpha on and Amount 1.0, then feed the result into a Canvas node's Mask input to punch a hole instead of cutting a disc.
  • Negative text over footage — Text as Image → Invert Image → Canvas on a layer above Video Player, so type reads against any background.
  • Fluid contrast pass — Liquid Simulation → Invert Image → Gaussian Blur → Canvas (additive blend) for glowing inverse plumes.
  • EEG-driven mood switch — FFT EEG band power → Remap (0…1) → Amount so the whole scene inverts as attention or relaxation rises.

Tips

  • This is a filter, not a source: it needs both an upstream image on its Image input and a downstream Canvas node to be seen.
  • The upstream generator does not need its own Canvas — Invert Image keeps its source rendered off-canvas automatically.
  • Inversion is premultiplied-correct: leave Invert Alpha off and transparent regions stay clean, with no grey halo around antialiased edges.
  • Amount at 0 still costs one fullscreen pass; use Enable (or bypass the node) when you want a genuinely free pass-through.
  • It is a single cheap fullscreen pass, so it stacks freely with other image filters — chain it with Image Adjustment, Gaussian Blur, Image Transform, Mask Grow, or Mask Outline in any order (order changes the look).
  • The Width/Height outputs mirror the source, so a Canvas node sized from this filter matches a Canvas sized from the original.

Open Invert Image in the interactive catalog →

Invert Image is one of 381 nodes in Grafit Pro.

Free download. Every feature for 7 days, no card. Then €99.99 once — or keep playing your projects as a Player.

More Generator nodes