Physically Modeled NTSC Composite / VHS Tape & CRT Electron-Beam Emulation
Simulates the full analog NTSC/VHS broadcast and tape pipeline—YIQ subcarrier modulation, bandwidth limiting, head-switching phase skew, and notch-filter demodulation—followed by a Gaussian CRT electron beam, phosphor mask, and halation.
Also known as NTSC/VHS signal emulation, composite video shader, CRT electron-beam post-processing
In the family Post-processing, color & imaging, analog signal emulation
Where it runs
Built inOfficial add-onPluginNone foundNot researched
| Engine | Support | How |
|---|---|---|
| three.js r187 | None found | |
| Babylon.js 9.38.0 | None found | |
| Godot 4.7 | None found | |
| Unity | None found | |
| Unreal 5.7 | None found | |
| Blender 5.2 | None found | |
| WebGPU W3C | None found | |
| Metal | None found |
How it works
Naive retro shaders fake VHS by adding static scanlines and RGB channel offsets, missing the coupled artifacts of real analog video. Signal-accurate emulation instead operates at the native composite resolution (typically 240 active scanlines per field, sampled at 4× the NTSC color subcarrier frequency) in four physical stages.
First, the gamma-encoded picture converts to YIQ color space; the I and Q chroma channels are low-pass filtered, quadrature-modulated onto the color subcarrier, and summed with luma Y into a single 1D composite waveform per scanline. Tape snow, tracking jitter, and head-switching horizontal skew perturb that composite waveform directly—so shifting a line also shifts its subcarrier phase, naturally producing authentic hue warps. Next, an NTSC notch or comb demodulator separates luma and chroma; residual cross-talk creates real dot crawl and rainbow shimmering on sharp high-frequency edges. A VHS tape pass further band-limits luma (with edge-sharpening ringing) and heavily smears chroma horizontally and vertically.
Finally, a CRT display stage linearizes the decoded signal, rasterizes each scanline as a brightness-modulated Gaussian electron beam with RGB deconvergence, applies an aperture-grille or shadow-mask phosphor pattern, and adds low-resolution phosphor bloom and glass halation.
When to choose it
Reach for it when
- simple scanline overlay looks fake compared to a real crt television
- want authentic composite video chroma bleed rainbow artifacts and luma ringing
- emulate vhs tape tracking jitter head-switching noise and chroma lag
- simulate yiq subcarrier modulation and phosphor bloom in a post-process pass
- give retro 3d scenes genuine analog broadcast and home-video texture
Choose it when you want genuinely authentic camcorder, VHS tape, or broadcast CRT imagery where rainbows, dot crawl, ringing, hue-shifted tracking errors, and blooming scanlines emerge from actual signal physics.
Prefer Film emulation (spectral stock simulation) when aiming for photochemical celluloid cinema rather than magnetic-tape television. Prefer Chromatic aberration and vignette and Film grain synthesis when you only want subtle optical lens defects without lowering spatial resolution. Prefer Pixel-art 3D rendering when crisp low-res pixels should remain sharp rather than analog-blurred.
Field marks
- Moiré interference patterns when an aperture-grille or shadow-mask phosphor grid is rendered on low-DPI or non-integer-scaled displays
- Severe loss of UI text legibility due to authentic VHS chroma subsampling and 240p horizontal bandwidth limits
- Temporal flicker or excessive eye strain if interlaced field alternation and tracking jitter are left unattenuated
- Over-darkened output if phosphor mask attenuation is not balanced with brightness compensation and halation
Presets
NTSC Composite / VHS & CRT Signal Emulation — clean digital RGB (left) vs YIQ subcarrier crosstalk, VHS skew & CRT phosphor beam (right)
{
"P_SUBCARRIER": 0.75,
"P_VHS_WEAR": 0.55,
"P_SCANLINES": 0.7,
"P_SPLIT": 0.45
}Show GLSL (154 lines)
const float P_SUBCARRIER = 0.75; // P YIQ Chroma Crawl [0.0, 1.2, 0.05]
const float P_VHS_WEAR = 0.55; // P VHS Tape Noise [0.0, 1.2, 0.05]
const float P_SCANLINES = 0.70; // P CRT Beam & Mask [0.0, 1.0, 0.05]
const float P_SPLIT = 0.45; // P Clean RGB / NTSC [0.0, 1.0, 0.02]
float hash11(float p) {
p = fract(p * 0.1031);
p *= p + 33.33;
p *= p + p;
return fract(p);
}
// Broadcast SMPTE test header + retro 1980s neon-horizon 3D chrome sphere scene
vec3 renderSource(vec2 uv, float t) {
// Top SMPTE color bar strip (reveals YIQ chroma bleed & notch crosstalk unmistakably!)
if (uv.y > 0.76) {
float idx = floor(uv.x * 7.0);
if (idx < 0.5) return vec3(0.85, 0.85, 0.85);
if (idx < 1.5) return vec3(0.88, 0.84, 0.12);
if (idx < 2.5) return vec3(0.12, 0.84, 0.86);
if (idx < 3.5) return vec3(0.14, 0.82, 0.24);
if (idx < 4.5) return vec3(0.86, 0.16, 0.84);
if (idx < 5.5) return vec3(0.88, 0.14, 0.16);
return vec3(0.14, 0.24, 0.88);
}
vec2 p = (uv - vec2(0.5, 0.38)) * vec2(1.5, 1.0);
// Sunset sky + striped retro sun
vec3 col = mix(vec3(0.10, 0.04, 0.22), vec3(0.56, 0.14, 0.44), smoothstep(0.32, -0.04, p.y));
float sunD = length(p - vec2(0.0, 0.08));
if (sunD < 0.22) {
float cut = step(0.22, fract(p.y * 28.0 - t * 0.4)) + step(0.10, p.y);
vec3 sunC = mix(vec3(1.0, 0.22, 0.38), vec3(1.0, 0.86, 0.24), smoothstep(-0.10, 0.26, p.y));
col = mix(col, sunC, clamp(cut, 0.0, 1.0));
}
// Perspective synthwave grid floor
if (p.y < -0.04) {
float z = 0.26 / max(-p.y - 0.02, 0.015);
float gx = abs(fract(p.x * z * 1.4) - 0.5);
float gz = abs(fract(z * 1.1 - t * 1.2) - 0.5);
float line = smoothstep(0.055, 0.015, min(gx, gz));
col = mix(vec3(0.04, 0.02, 0.12), vec3(0.14, 0.92, 0.98), line * exp(-z * 0.11));
}
// Floating metallic chrome sphere in foreground
vec2 sp = p - vec2(0.22 * sin(t * 0.7), -0.02 + 0.04 * cos(t * 1.1));
float r = length(sp);
if (r < 0.16) {
float nz = sqrt(max(0.16 * 0.16 - r * r, 0.0));
vec3 n = normalize(vec3(sp, nz));
vec3 ref = reflect(vec3(0.0, 0.0, -1.0), n);
vec3 env = (ref.y > 0.0)
? mix(vec3(0.95, 0.35, 0.55), vec3(0.18, 0.32, 0.76), ref.y)
: mix(vec3(0.08, 0.04, 0.18), vec3(0.16, 0.92, 0.95), smoothstep(0.45, 0.5, abs(sin(ref.x * 16.0))));
col = env + vec3(1.0, 0.96, 0.88) * pow(max(dot(ref, normalize(vec3(0.4, 0.6, 0.7))), 0.0), 24.0);
}
return col;
}
vec3 rgb2yiq(vec3 c) {
return vec3(
dot(c, vec3(0.299, 0.587, 0.114)),
dot(c, vec3(0.596, -0.274, -0.322)),
dot(c, vec3(0.211, -0.523, 0.312))
);
}
vec3 yiq2rgb(vec3 yiq) {
return vec3(
yiq.x + 0.956 * yiq.y + 0.621 * yiq.z,
yiq.x - 0.272 * yiq.y - 0.647 * yiq.z,
yiq.x - 1.106 * yiq.y + 1.703 * yiq.z
);
}
void mainImage(out vec4 fragColor, in vec2 fragCoord) {
vec2 uv = fragCoord / max(iResolution.xy, vec2(1.0));
float split = clamp(P_SPLIT, 0.0, 1.0);
float subAmp = clamp(P_SUBCARRIER, 0.0, 1.3);
float wear = clamp(P_VHS_WEAR, 0.0, 1.3);
float scan = clamp(P_SCANLINES, 0.0, 1.0);
vec3 col = vec3(0.0);
if (uv.x < split) {
col = renderSource(uv, iTime);
} else {
// Subtle CRT glass barrel curvature
vec2 cc = uv * 2.0 - 1.0;
vec2 cuv = uv + cc * dot(cc, cc) * 0.032 * scan;
// VHS head-switching skew at bottom 6% of frame + per-scanline jitter
float lineId = floor(cuv.y * 240.0);
float headSwitch = smoothstep(0.075, 0.015, cuv.y) * (0.018 * sin(cuv.y * 190.0 + iTime * 22.0) + 0.012);
float lineJitter = (hash11(lineId + floor(iTime * 30.0) * 17.3) - 0.5) * 0.0045 * wear;
cuv.x += headSwitch * wear + lineJitter;
// Stage 1-3: Composite NTSC YIQ encoding -> narrowband chroma low-pass -> subcarrier crosstalk demodulation
float yAcc = 0.0;
float iAcc = 0.0;
float qAcc = 0.0;
float wY = 0.0;
float wC = 0.0;
float phase0 = cuv.x * 260.0 + lineId * 2.0944 + floor(iTime * 30.0) * 3.14159;
for (int k = -3; k <= 3; k++) {
float fk = float(k);
vec2 suv = clamp(cuv + vec2(fk * 0.0026, 0.0), 0.001, 0.999);
vec3 yiq = rgb2yiq(renderSource(suv, iTime));
// Modulate composite signal s(t) = Y + I cos(wt) + Q sin(wt)
float ph = phase0 + fk * 1.570796;
float comp = yiq.x + (yiq.y * cos(ph) + yiq.z * sin(ph)) * subAmp;
// High-freq luma leaks into chroma demodulator (dot crawl & rainbowing)
float wy = exp(-fk * fk * 0.42);
float wc = exp(-fk * fk * 0.14);
yAcc += (yiq.x + (comp - yiq.x) * 0.16 * subAmp) * wy;
iAcc += (yiq.y + (comp - yiq.x) * cos(ph) * 0.28 * subAmp) * wc;
qAcc += (yiq.z + (comp - yiq.x) * sin(ph) * 0.28 * subAmp) * wc;
wY += wy;
wC += wc;
}
vec3 yiqOut = vec3(yAcc / wY, iAcc / wC, qAcc / wC);
// VHS chroma delay & snow speckle on dropout lines
float dropout = step(0.992 - wear * 0.012, hash11(lineId * 1.7 + floor(iTime * 18.0) * 3.1));
yiqOut.x += dropout * (hash11(fragCoord.x + iTime * 90.0) - 0.2) * 0.45 * wear;
col = clamp(yiq2rgb(yiqOut), 0.0, 1.4);
// Stage 4: Gaussian CRT electron-beam scanline profile + RGB aperture-grille phosphor mask + halation
float scanPhase = fract(cuv.y * 240.0) - 0.5;
float beamWidth = mix(0.24, 0.42, clamp(yiqOut.x, 0.0, 1.0));
float beam = exp(-(scanPhase * scanPhase) / max(beamWidth * beamWidth, 0.02));
col *= mix(1.0, 0.42 + 0.85 * beam, scan);
float pxMod = mod(floor(fragCoord.x), 3.0);
vec3 grille = vec3(
pxMod < 0.5 ? 1.16 : 0.84,
(pxMod >= 0.5 && pxMod < 1.5) ? 1.16 : 0.84,
pxMod >= 1.5 ? 1.16 : 0.84
);
col *= mix(vec3(1.0), grille, scan * 0.55);
// Subtle glass phosphor bloom & vignette
col += col * col * 0.18 * scan;
float vig = 1.0 - dot(cc * 0.42, cc * 0.42) * scan;
col *= clamp(vig, 0.45, 1.0);
}
float sep = smoothstep(0.0035, 0.0008, abs(uv.x - split));
col = mix(col, vec3(0.95, 0.98, 1.0), sep);
fragColor = vec4(clamp(col, 0.0, 1.0), 1.0);
}Attribution: MIT — written for this index.
Measured GPU weight & timing
| Preset | GPU | Weight / p50 / p95 | Method |
|---|---|---|---|
| ntsc-composite-vhs-crt-signal-emulation-live | Tesla T4 1920x1080 | 8.22× baseline (moderate) · 0.270 ms / 0.277 ms | opengl-timer-query · 32 frames · GPU Weight Atlas · Colab T4 sweep |
| ntsc-composite-vhs-crt-signal-emulation-live | NVIDIA L4 1920x1080 | 6.61× baseline (moderate) · 0.105 ms / 0.108 ms · 2.6× faster on L4 | opengl-timer-query · Cross-architecture validation |
| ntsc-composite-vhs-crt-signal-emulation-live | NVIDIA A100-SXM4-40GB 1920x1080 | 4.99× baseline (light) · 0.144 ms / 0.145 ms · 1.9× faster on A100 | opengl-timer-query · Cross-architecture validation |
Crosses
- Sonar echolocation point clouds on analog VHS-CRT: A dark world revealed only by expanding acoustic pings, displayed as if recorded onto worn magnetic tape and played back on a curved phosphor CRT. Sparse high-contrast sonar dots trigger authentic NTSC chroma ringing, tape tracking jitter, and blooming scanlines that turn bare point clouds into tactile analog telemetry.
- Multi-Bounce Acoustic Ray-Traced Echolocation Point-Cloud Visualization: Transforms sparse luminous echolocation point clouds into found-footage camcorder video with authentic VHS bleed and CRT halation.
- AgX: Maps linear HDR scene light into display-referred gamma RGB prior to YIQ composite signal encoding.
Sources
- primaryntsc-rs (2023). ntsc-rs/ntsc-rs. Free, open-source VHS effect. Standalone application + plugin (After Effects, Premiere, and OpenFX).GitHub API · license NOASSERTION · 2026-11-30
- implementationlibretro (2016). libretro/slang-shaders.GitHub API · no license declared · 2026-11-30