WebGL and shader background templates

BuildMotions has more than 40 WebGL and shader backgrounds that run on the GPU and loop without a seam, each with a live preview, source code and an AI prompt to rebuild it in your stack.

A shader background is a small program the GPU runs for every pixel, every frame. It gives smooth, resolution-independent motion (fog, water, fields, light) at a fraction of a video’s weight.

These backgrounds pause when off screen, cap their frame rate on battery and fall back to a still image when WebGL or motion is unavailable.

42 matching templates

See all 42 in the library

How to use it

  1. Pick a mood, then tune. Each background exposes a few parameters (speed, scale, colours) you can change without touching the shader maths.
  2. Place it behind content. Use it as a fixed or section background and keep text contrast with a gradient scrim.
  3. Pause when hidden. Stop the render loop with IntersectionObserver and the Page Visibility API.
  4. Provide a fallback. A static poster for reduced motion, no WebGL, or very low-end devices.
  5. Check battery and heat. Lower the resolution scale on mobile; most backgrounds look the same at 0.5× device pixels.

Tips

  • Seamless loops come from periodic time (sin/cos of time), not from resetting time to zero.
  • Keep colours in uniforms so the background follows your theme.
  • One shader per page is plenty.

Questions

Do shader backgrounds hurt performance?
Not when they pause off screen and render at a lower resolution on phones, which all of these do.
Do I need Three.js?
No. Most of these use a single WebGL canvas with a fragment shader; a few 3D scenes use Three.js.
Can I change the colours?
Yes. Colours and speed are parameters, and the prompt tells your AI tool how to expose them.