Medium FiltersAnimated

CRT monitor

Old TV: curved screen, scanlines, a flickering brightness and dark corners.

The target picture for the shader challenge "CRT monitor"
Recreate this picture. You pass at a 99% match, then try to write it in fewer characters than the par.

How this challenge works

You write a fragment shader that draws the picture above, live in your browser. A match bar shows how close you are, and the score combines accuracy, code size (the par is 952 characters in Unity (Built-in)) and GPU speed. Work in HLSL, GLSL, WGSL, Metal or Godot and export the result when you are done.

The numbers you need

Curve
c = uv * 2.0 - 1.0; c *= 1.0 + 0.1 * dot(c, c) * ... → q = c * 0.5 + 0.5 (use: c = c * (1.0 + 0.12 * dot(c.yx, c.yx)))
Outside
black if q is outside 0..1
Scanlines
0.85 + 0.15 * sin(q.y * 600.0)
Flicker
0.97 + 0.03 * sin(time * 40.0)
Vignette
1.0 - 0.6 * dot(c, c) * 0.5

Helper functions provided

The toolbox has: scene(). Add them above your frag function with one click.

Solve it in your language

Unity (Built-in), Unity (URP), Unreal, Shadertoy / WebGL, OpenGL (LWJGL, raylib), three.js, GameMaker, LÖVE (Lua), Godot, Apple (iOS, macOS), WebGPU / Bevy.

Start coding