This healthcare campaign came to me through an agency as two display sizes, a 300×600 half page and a 970×250 billboard. The design asked for a field of glowing dots that drifts behind a short headline.

The problem with a moving background

A background that keeps moving is the expensive part of a banner like this. The usual options all fight the file-weight limit:

  • A looping video background is heavy and is not accepted by every HTML5 placement.
  • A sequence of large images adds weight with every frame and still looks stepped.
  • A single static image loses the effect the design was built around.

The approach: draw it in code

Instead of shipping pixels, the background is a small WebGL fragment shader that draws the dot field on the fly. Each banner is a single HTML file with no bitmap images at all: the dots, the type and the logo are drawn by the browser. That leaves the file-weight budget for what matters to ad ops, the clickTag and the backup image, instead of a background asset.

The headline and logo sit on top as normal HTML and SVG and are animated with a GSAP timeline, so the message stays sharp and readable on the final frame while the shader keeps moving behind it.

One master, adapted per size, keeps both formats telling the same story. The billboard uses the same shader and timeline, recomposed for a wide, short format.

One master, two sizes

The 300×600 and the 970×250 share the same shader and the same timeline. Only the composition changes: in the tall format the headline sits low under a column of dots, in the billboard it reads left to right across the field. Because both sizes come from one master, a copy change is made once and checked in both.

The numbers

  • Two sizes: 300×600 and 970×250, from one master.
  • Image files per banner: none.
  • Each banner as shown on this page is one HTML file of about 68 KB when compressed, animation library included. Google Ads currently allows 600 KB for an uploaded HTML5 ad.
  • The set was also delivered as MP4 for placements that take video instead of HTML5, exported from the same master so both formats end on the same final frame.

What made this work

  • A generated background instead of a background asset, so the banner stays one light file.
  • Text and logo as live HTML and SVG on top, so they stay sharp in every size.
  • One master for both sizes, so changes are made once.

For agencies planning something similar

Send the design as it is, even if the background looks impossible within the limit. I will tell you before the build whether it can be drawn in code, and you see it running in the key size before the rest of the set is made. The price follows the usual logic: €100–200 for the key size, about 50% for each extra size, with GIF and MP4 versions quoted with the set.

When this approach fits

A shader background suits abstract, brand-led motion: particles, gradients, patterns, light. It is not a replacement for product photography or footage. If your design has a moving background and the platform has a strict weight limit, it is worth asking early whether it can be drawn in code.