Hi all. I wanted the look I remember from fat CRT TVs, not just scanlines on top of sharp pixels, so I made a shader that simulates the whole path:
console video encoder → cable → TV decoder → electron beam → phosphor mask → glass
What that gets you:
- Real composite/RF/S-Video/RGB. The signal is encoded onto the colour subcarrier with each console's real pixel clock, then decoded like a TV would. Sonic's waterfalls turn translucent with the rainbow edge, PS1 dithering melts into smooth gradients, and RGB stays sharp.
- Electron beam whose width grows with brightness, so bright lines merge and dark lines show gaps.
- Masks: aperture grille (with Trinitron damper wires), slot mask, shadow mask, CRT projector screen.
- Glass: curvature, halation, white point, misconvergence.
Zero setup: the console is detected from the frame size (NES, SNES, Mega Drive, PS1, PS2, Amiga, arcade, DOS), and higher internal resolutions on PS1/PS2 work too.
Presets (each in a `curved/` and a `flat/` folder): Consumer TV Composite, Consumer TV SCART RGB, Trinitron S-Video, Studio Monitor RGB, Old TV RF, CRT Projector, PC Monitor VGA, Amiga 1084S.
Install: copy the `lola-retro` folder into your shaders folder, load `curved/consumer-tv-composite.slangp`. Needs a slang driver (Vulkan, glcore, Metal, D3D11/12).
There's a file with recommended cores and settings for everything from NES to PS2.
Tested on glcore and Vulkan, and on a Mac with Metal. D3D isn't tested yet, so reports are welcome. MIT licensed.
(Note: tested on quite strong M4 Pro with 24 gb ram, works well. How it works on slower PCs, I have no idea)
It's named after Lola, my retriever. Retro because it is retro.
https://github.com/zoran123456/lola-retro
Feedback welcome, especially from people who still have real CRTs to compare.
---
Youtube demonstration
https://www.youtube.com/watch?v=7losgxx2cp0