Motion Fundamentals

Shaders & GPU procedural motion

Also searched as: shader, fragment shader, GLSL, procedural graphics, GPU rendering, pixel shader

Canonical Definition

A shader is a program running directly on the GPU that calculates color for millions of pixels in parallel every frame, enabling procedural noise, caustics, and organic distortions.

Duration

Continuous procedural execution

Drawing complex organic phenomena (flowing fluids, liquid glass, chromatic dispersion, smoke) with standard DOM nodes or canvas strokes is CPU-prohibitive. Fragment shaders run in GLSL across thousands of GPU cores simultaneously.

In modern video pipelines, shaders power luxury backgrounds, liquid transitions, holographic glitch effects, and atmospheric textures at full 60fps.

Simplex Noise & Domain Warping

Generating non-repeating organic gradients with mathematics

By feeding the current frame number and UV coordinates into fractional Brownian motion (fBm) noise functions, shaders create liquid ripples and fluid currents.

Catalog Implementation/Mesh Gradient Background
componentbackgroundsInspect in catalog
295 lines of React

How this works: A GPU shader calculating real-time fluid mesh warping with vibrant color dispersion.

  • Evaluated per-pixel in parallel on the GPU
  • Completely resolution-independent: renders crisp at 1080p, 4K, and 8K
  • Zero pre-rendered video file weight

Engineering Guidelines & Common Pitfalls

Best Practices (What to do)

  • Normalize coordinates using `gl_FragCoord.xy / u_resolution.xy` to ensure aspect ratio independence.

Common Failure Modes (What to avoid)

  • Writing unoptimized nested loops in GLSL that cause frame drop during browser preview.
Generate with AI

Build shaders & gpu procedural motion in Animatiq

Prompt our motion agent in natural language. Get back typed Remotion React code with custom easing curves, brand palettes, and frame-accurate timing.

Launch in composer

Related motion principles