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.
Live preview
Interact with the effect here. Drag, hover, and use its controls.
Variation Tweaking
Adjust the options and see the preview update live.
Installation
Install automatically via CLI or manually integrate dependencies and code.
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.
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.
Limitations
Features
Meet the team behind the interaction
Crafted for modern web applications and AI agent workflows.
