Journal
Nov 4, 2026·2 min read· WebGL

Render targets are just textures

A render target is a texture the GPU can draw into instead of drawing to the screen. That is the whole idea, and a surprising number of effects are built from nothing else.

Three uses from this site

A window inside a room. The studio's window shows the same fog and rain as the intro. The rain scene renders into a target, and the window pane is a plain mesh that uses that target as its map.

Feedback. The fog remembers where you wiped because each frame reads last frame's target and writes a new one. You need two targets and swap them, since a shader cannot sample the texture it is rendering to. This is usually called ping-pong.

Doing work once. A blur is expensive. Blurring a picture into a target once, and sampling that from then on, turns a per-frame cost into a one-off.

Things that bite

  • Size. A target does not have to match the screen. Half resolution is often invisible for soft things like fog and glow.
  • Colour space. Decide whether a target holds colour or data. A mask is data and should not be gamma-corrected on the way in or out.
  • Disposal. Targets hold GPU memory until you call dispose(). Components that create them should release them when they unmount.
  • Updating when nobody looks. If the window is not in view, its target does not need a new frame. I render mine at half rate until the visitor walks up to it.