Interactions
ShadersFree

Video Shader

Real-time WebGL video post-processing canvas with ASCII blocks, LED matrix, CRT terminal, Bayer dithering, halftone dots, VHS tape, edge contours, and interactive hover lenses.

Full-page view

Live preview

Interact with the effect here. Drag, hover, and use its controls.

Loading video

Variation Tweaking

Adjust the options and see the preview update live.

Shader Mode
Tint
Hover Effect
Container Fit
0.22
1
10
0.55
1.15
0
0.35

Installation

Install automatically via CLI or manually integrate dependencies and code.

$npx @istmx/ui add video-shader

Usage

Import the component and configure visual variants, sizes, and operational states.

import { VideoShader } from '@/components/interactions/video-shader'
 
<VideoShader
src="/assets/videos/video1.webm"
mode="ascii"
tint="monochrome"
hoverEffect="reveal"
className="aspect-video w-full max-w-lg rounded-xl"
/>

Composition

Compose with icons, form triggers, and layout containers.

<div className="relative aspect-video w-full max-w-2xl overflow-hidden rounded-2xl">
<VideoShader
src="/assets/videos/video1.webm"
mode="ascii"
tint="monochrome"
hoverEffect="reveal"
playbackRate={1}
depthStrength={0.55}
/>
</div>

API Reference

Property matrix, types, defaults, and usage descriptions.

PropTypeDefaultDescription
srcstringrequiredSource URL for the video (.webm, .mp4).
mode
'ascii''led''terminal''dither''halftone''edge''vhs''depth'
'ascii'Active WebGL post-processing shader mode.
tintVideoShaderTint'monochrome'Color grading tint or dual-tone gradient palette.
hoverEffect
'reveal''rgb''spotlight''shake''glitch''none'
'reveal'Interactive effect triggered on pointer hover.
hoverRadiusnumber0.22Radius of cursor-anchored hover effects.
position
'relative''absolute'
'relative'Layout positioning mode for inline or full-bleed background placement.
fit
'cover''contain'
'cover'Aspect-ratio fitting inside the WebGL viewport.
cellSizenumber10Grid cell size in pixels for ASCII, LED, halftone, and dither modes.
contrastnumber1.15Luminance contrast multiplier.
brightnessnumber0Luminance brightness offset (-0.3 to 0.3).
depthStrengthnumber0.55Strength of 3D perspective tilt and internal parallax.
scanlinesnumber0.35Scanline intensity for CRT and VHS modes.
playbackRatenumber1Video playback speed multiplier (0.25 to 2.5).
pausedbooleanfalsePauses video playback while preserving hover interactivity.
showOverlaybooleanfalseDisplays minimal monospace HUD status in the top corners.

Data Attributes

State-reflecting DOM attributes for custom selector styling.

This component does not expose custom data attributes. Standard HTML data attributes are forwarded to its interactive element.

How It Works

Uploads each decoded HTML5 video frame as a WebGL texture every animation frame, applies aspect-aware cover/contain UV mapping, executes the active fragment shader pass (ASCII block atlas, LED pitch grid, CRT terminal, Bayer 4x4 dither, halftone, Sobel edge, VHS, or luminance depth), and layers pointer-driven hover effects and 3D spring perspective tilt on top.

Accessibility

Respects prefers-reduced-motion by disabling 3D perspective tilt and depth parallax while preserving video playback and shader rendering.

Keyboard Navigation
TabFocuses surrounding playback or variation controls.

Limitations

•Cross-origin video URLs require CORS headers (Access-Control-Allow-Origin) to allow WebGL texImage2D sampling.
•Requires WebGL hardware acceleration in the browser.

Features

•8 real-time GPU shader modes: ASCII Blocks, LED Matrix, Terminal CRT, Bayer Dither, Halftone Dots, Edge Contour, VHS Tape, and Depth Relief.
•12 single and dual-tone color tints including Monochrome, Rose, Cyberpunk, Vaporwave, Sunset, and Infrared.
•6 interactive hover effects: Color Reveal, Chromatic Split, Spotlight, Frame Shake, Glitch, and None.
•Adaptive container sizing with relative/absolute positioning and cover/contain video fit.
•Built-in preloader state, playback speed control, and 3D pointer perspective tilt.
Credits

Meet the team behind the interaction

Crafted for modern web applications and AI agent workflows.

Aryan

Aryan

@istmX

Building high-performance interfaces, developer tooling, and autonomous agent workflows.

Helped by
Ella

Ella

UI/UX Designer

Crafting beautiful experiences.

Kenji

Kenji

WebGL & Shader Designer

Bringing visuals to life.

Sarah

Sarah

Motion Designer

Animating the details.