A lightweight collection of real-time OBS shaders focused on perceptual lighting, luminance shaping, and motion continuity.
These shaders improve perceived visual quality without heavy GPU cost, extra render passes, or offline processing.
This repository contains two core systems:
A screen-space lighting system that simulates directional light using luminance gradients and pseudo-depth.
A temporal smoothing system that blends motion over time to reduce perceived frame gaps (useful for 30 FPS content on higher refresh displays).
Simulates directional lighting on flat images/video by:
- estimating pseudo-depth from luminance
- deriving surface direction from pixel gradients
- applying directional lighting + highlight compression
- remapping luminance using a controllable βgraphite response curveβ
This creates the illusion of depth, volume, and lighting in 2D content.
- Screen-space pseudo-3D lighting
- Adjustable light position (X/Y)
- Warm/cool key tinting
- Depth-based masking system
- Graphite luminance compression system
- Highlight rolloff (film-style compression)
- Fully real-time (single pass, OBS-safe)
| Control | Value |
|---|---|
| Light Softness | 1.0 |
| Intensity | 0.01 β 0.03 |
| Highlight Start | 0.90 β 0.95 |
| Highlight Softening | 0.05 β 0.10 |
| Depth Exponent | 1.0 |
| Graphite Dark Response | ~0.9 β 1.0 |
| Max Luminance | 0.995 |
| Min Luminance | 0.005 |
This replaces simple brightness with a controlled compression mapping system.
Instead of leaving brightness linear:
- Dark values are gently lifted toward
Min Lum - Bright values are gently compressed toward
Max Lum - Midtones are preserved unless modified by shadow weighting
Think of it like this:
Before:
0.00 β black
1.00 β pure white
After:
0.00 β lifted to MinLum (not pure black)
1.00 β compressed to MaxLum (not pure white)
Then the entire range is redistributed smoothly between them.
Controls how strongly shadows are reshaped.
- Lower values β more linear / natural
- Higher values β stronger βink / graphite liftβ
- Uses a shadow-weighted curve so only darker regions are affected more heavily
The mid pivot acts like a hinge point in luminance space.
Imagine a folding door:
Dark side ββββββ hinge ββββββ Bright side
- Values below Mid β pulled darker or suppressed
- Values above Mid β lifted or brightened
- The pivot itself stays stable
- Mid = neutral anchor
- Below mid = βfalls into shadow sideβ
- Above mid = βlifts into highlight sideβ
- Faces (subtle sculpting)
- UI separation
- Cinematic lighting control
- Depth isolation inside flat scenes
| Use Case | Value |
|---|---|
| Natural balance | 0.45 β 0.55 |
| Dark-heavy scenes | 0.35 β 0.45 |
| Bright UI / overlays | 0.55 β 0.70 |
Prevents bright areas from clipping or flattening.
Highlight Startβ where compression beginsHighlight Softeningβ how gradual the rolloff is
Recommended:
- Start: 0.90 β 0.95
- Softening: 0.05 β 0.10
Simulates temporal continuity by blending:
- current frame
- previous frame buffer
- motion-direction sampling
This reduces perceived stutter in lower FPS content.
- Motion-based temporal blending
- Directional blur along motion vectors
- Depth-aware persistence control
- Adjustable decay (trail length)
- Perceptual motion weighting
| Control | Value |
|---|---|
| Motion Strength | 0.6 β 0.8 |
| Decay Clamp | 0.05 β 0.1 |
| Depth Influence | 0.0 β 0.3 |
| Frame Time | 0 (Raw Mode) or match FPS |
| FPS | Frame Time |
|---|---|
| 60 | 0.0167 |
| 30 | 0.0333 |
| 24 | 0.0416 |
- Frame Time = 0
- Shader derives behavior from runtime sampling
- Install OBS Shader Filter plugin (Exeldro or equivalent)
- Add filter β βCustom Shaderβ
- Load
.shader/.effectfile - Apply to:
- Game capture
- Display capture
- Media sources
These shaders prioritize:
- perceptual improvement over physical accuracy
- real-time performance over simulation fidelity
- minimal sampling cost
- controllable aesthetic response
- OBS pipeline compatibility
The goal is not realism alone β but better perceived clarity, depth, and motion stability in live viewing conditions.
- Single-pass rendering
- No compute shaders
- No external dependencies
- Designed for 30β60 FPS streaming
- Motion shader is heavier due to temporal sampling, but GPU-safe on modern hardware
- Live streaming (Twitch / YouTube)
- Game capture enhancement
- Cinematic OBS scenes
- UI depth styling
- Low-FPS β high-refresh perception smoothing
- Motion persistence requires proper previous-frame buffer support in OBS
- FrameTime accuracy improves motion realism but is optional
- Graphite system is intentionally non-linear for perceptual shaping
Two systems working together:
- Relight Shader β spatial perception (light + depth illusion)
- Motion Shader β temporal perception (motion continuity)
Combined, they enhance perceived realism without increasing resolution or render cost.