Version NG-1.4 is up on github and should be available via online updater in Retroarch.
Hi guys, first post here. In the past I made a shader for FS-UAE (Amiga emulation), but since i found that retroarch has a pretty good support for whdload games, I ported it to slangp so that it can be used with other emulators too.
I’m not that expert with technical terms, but i’m fortunate enough to own an old 15khz slot mask crt monitor inside an arcade cab loaded with Advance mame and other old emulators, so I used it as a reference. Why using a shader, you may ask, instead of the almost “real thing™”?
Actually that thing is big, heavy and power hungry and since it is running on an old AthlonXP i expect it to break sooner or later and i’ll not have spare time to fix, that’s for sure. Also, i’ve finally got an awesome oled 4k tv and i think that with that amazing (low) pixel persistance and resolution, we can get pretty damn close to the “real thing™”
One of the main goal of this shader is to be usable on integrated GPUs.
Granted, don’t expect it to run on a Raspberry pi, but the actual target is
Intel Haswell, the one on which I develop it, where it perform with all the features
enabled, when dealing with 240p content, on 1080p at resolution ad about 85/90fps.
Click to read features
- RGB phosphors
- RGB deconvergence
- NTSC/PAL CVBS color bleeding
- Aperture grille and slot mask.
- Input signal glowing
- Output signal glowing
- Gamma, contrast, saturation, luminance, color temperature adjustments
- Black frame insertions through alternate blanking
- Interlace flickering, forcing and emulation
- Ambient lights
- Vignette and Spotlight
- Bezel (Thank you HyperspaceMadness for allowing me to rip his automagically generated bezel!) https://github.com/HyperspaceMadness/
- Background images
- Full screen glowing
- 3D rotation/tilt
- Integer scaling
- Background image Night mode
- Support for backdrop images for BW game/CABs that use mirrors
- NTSC emulation with selective artifacts smoothing
- Temporal bloom
- RF Noise
- Dot matrix display emulation with grid, shadow and motion blur (gameboy mono)
- Monochrome display “colorization”
- TATE mode
Click to read relevant changes over 4.1 and NG-1.0
Main changes from NG-1.0
- Xbox/d3d compatibility: add specific workarounds, enable them by editing config/config-static.inc
- New config/config-static.inc and config/config-user.txt files. Use them to change static parameters or tu turn runtime parameters into static ones and gain performance. Keep a backup before updating, ofc.
- Mitigate glitch patterns in Generic-Handheld-RGB.slangp
- Add two handhelds dotmatrix presets “dots” in uncorrected aspect and 4:3 aspect
- Wider ambientlight in generic handhelds rgb preset
- Tweaked ambientlight on gba night preset
- GBA preset: Switched from dotmatrix to pixelgrid
- Reduce spot power on immersive preset
- Add a simple immersive fxaa preset in the old 4.1 folder
- Updated overmask presets to include unsharp-mask+FXAA and moire mitigation
- New preset Monitor-Screen_Hmask_WideR-Screen_SlotMask
- Removed GEOM_CUT_EARS parameter, useless since using my curvature now
- Add moire mitigation option
- Allow to define ambientlight wideness for rotated games
- Allow to switch to fake integer scanlines, always or only on interlaced screens (see docs)
- Haloing can happen on an already “scanlined” image if a new static parameter: HALO_PRE_SCANLINE_GAP
- Remove Inter-cell extra steepness parameter; it has been never used and has very little effect
- Vertical cell Mask->Vertical shift: negative values will select the sharpest line when using screen coords
- Bloom strength on white area was broken when using content geometry override, fixed
- Mitigate clipping on bright background images when mixing ambilight over them
- Disable ambientlight debanding grain/noise when using a background image
- Recentered wx mask so that phosphor falls at the center
- Fixed textures paths in handhelds presets
- Give halo a slight (very slight) rounder look
- Slightly optimized pixel_blank_alternate (still statically disabled)
- Dedot: use green as main channel
- Move DYNZOOM_FACTOR in the static config file
- Switch TATE mode to Auto by default, should affect all the presets
- Modified debanding code, should be a bit faster now
- Found a bottleneck in the vignette/spot code; small speedup
- Since we gained some fps, switch HALVE_BORDER_UPDATE to 0.0 by default
- small optimization to ntscdec()
Main changes from 4.1
Low level phosphor-grid which superseedes scanlines, vertical and horizontal mask. provides more features and is much more flexible by allowing to emulate common masks and freely draft new ones.
Add a new overmask preset to increase the whole visible mask (at the price of moire patterns on lower resolution).
Add a new Spark look punch to increase the vertical mask effect.
Allow to vertically stagger single phosphors to better emulate y-deconvercence.
Allow to change vertical and horizontal mask gamma.
Spot is now painted over the whole tube when using bezels and not just on the game content.
Improved reflection look.
Workaround for Flycast + Nvidia + Glcore + Ambient light not playing well (that was tough).
Ambient light scene changes are not instantaneous.
Selective NTSC artifacts blurring: inverted logic/workflow.
Switched to my own curvature function.
Luminosity tied zoom now has an hardcoded range.
Add an option to show “basal” unexcited phosphors grid.
Allow to use negative blurring parameters to switch from gaussian to box + (eventually) unsharp mask.
Input gain is not tied to glow feature anymore, moved to color correction section.
Prevent bloom from color shifting high tones due to color temperature.
Allow to pre-attenuate gain levels before applying halo. That way it does not change whan changing gain and may help in avoiding cascading effects when drafting presets.
Overhauled nightify function.
Allow to widen the ambient light effect without pushing led power
Allow to set virtual led position.
New ambient light “immersive” preset.
Now ambient light bezel and/or background image colorization can use two blend modes, multiply and add (see foggy parametter)
New active (not used because prone to change) parameter to clear dot masks betweeb scanlines (dedot).
Ambient light does not depend on color/brightness corrections anymore, set it (once) and forget.
Debanding is now applied on green component only.
Ported all old preset to new code.
Made new presets to show different masks possibilities.
Experimental delta render to save on battery powered devices which only render zones of the screen that has been changed Statically disabled.
Allow to set minimum lines to detect interlaced content by runtime parameter.
Add overlay-powered handhelds presets for: Gamegear,Gameboy Advance, Gameboy mono and Gameboy mono pocket.
More colorful Ambient lights.
Dot Matrix strength has now an “auto” parameter that adapt the grid steepness to the viewport size to mitigate glitches.
- Make sure to read the docs!
- Main development done on this Github repo
- Stable releases should be available through Retroarch’s online updater
(shaders_slang/bezel/koko-aio/) or here.
- Click here if you want to try the latest in-develompent shader and unpack the zip somewhere inside your -already in place- shader directory.
I do not ensure you it will work as expected nor that your cat will be safe.
- More presets and additional artworks: koko repo || estefan3112 repo || Starman99x repo
- If you want to boost your fps and you don’t mind tinkering with text files, take a look to the file config-user.txt in the shader folder and follow the instructions; on intel IGPs, I’ve seen fps boosted by 45%.
Please, tell me what you think, any comment is really appreciated.
Dynamic room lights (immersive preset)
Ntsc selective blurring and sharpening
monitor-slotmask-bloom-bezelwider - Arcade - Final fight
monitor-Commodore_1084S-wider - Amiga - ProjectX SE
tv-PAL-my-old - Master System - Trans Bot
tv-NTSC-1 - Genesis - Sonic 2
tv-NTSC-2 - Snes - Aladdin
tv-aperturegrille-bloom-bezel - Amiga - Leander
gameboy_mono_colorized.slangp - Gameboy mono - Super Mario Land