>> Starting from the code from 2024-June-13, Koko-aio needs at least Retroarch 1.16 to work <<
Version NG-1.9.70 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 (outdated)
- Scanlines
- Screenlines
- RGB phosphors
- RGB deconvergence
- NTSC/PAL CVBS color bleeding
- Aperture grille, slot mask, shadomask.
- Input signal glowing
- Output signal glowing
- Blooming
- Gamma, contrast, saturation, luminance, color temperature adjustments
- Black frame insertions through alternate blanking
- Interlace flickering, forcing and emulation
- Antialiasing
- Curvature
- 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 previous releases
v1.9.70
New:
- Phosphor triads with core resolution: Allow to target a TVL.
- Backdrop: Permit to draw it just over the tube, Can now be used to simulate screen ambient reflections.
- Allow to convert progressive input to interlaced.
- make a generic low_fps() function that takes care of returning when content is under 30 or 35 fps.
- Disable flickering on low fps interlaced content
- interlacing + low level phophorgrid/scanlines: take halved period into account for fake integer scanlines activation
- Add a function to clear “hives” like patterns when using dscanlines gap + slotmask
Changes:
- Dot Crawl Tweaks
- textures/boothill.jpg -> textures/backdrop.jpg
Fixes:
- correctly scale slotmask dividers width to horizontal mask multiplier even when using core coords/size. BLAME ME FOR POSSIBLE REGRESSIONS
- Correct warpedglow aspect
- limit minimum warpedglow dynamic as i think there are rounding errors.
- fix aliasing inside bezel border (evident when using high powered spot)
- Slightly correct bezel aspect (4px wider texture)
Presets:
- Add a preset that leverages TVL function
- retweak GBA
- do not use auto fake integer scanlines when using fake slotmask, since it mitigates moire already.
- sharper Monitor-Screen_Hmask-Screen_SlotMask_Taller_Brighter
- Monitor-Screen_Hmask-Screen_SlotMask_Taller_Brighter: trade hmask for scanlines, keep brightness
- Improve Monitor-Screen_Hmask-Screen_SlotMask_Taller_Brighter.slangp
- Monitor-Screen_Hmask-Screen_SlotMask_Taller/brighter, use dehive function, better slotmask
- Tuned taller slotmas preset: switch grom BRG to GMX mask as it may give a more sparkling look (due to green being near black?)
- presets: fine tune corners/edges
Performance:
- Despite of new functions, performance is the same as the previous release.
- Apply rgb mask multiplier in vertex shader, spare a vertex to fragment variable
- BG_IMAGE_OVER: do not re-sample ambient light again
- Do not sample ambient light again in fn_pixel_bezel()
- skip a (now) useless ambient light re-sample
- move border paint condition from canvas_bust to canvas_bezel_screen; *** blame me for regressions *** …That way it we can skip computing abientlight twice under the bezel.
- warpedglow: 2 minor optimizations
- Do not check if PIXELGRID_MIN_H < PIXELGRID_MAX_H, spare cycles.
…please do not scanline max size < min_size in shader parameters
- spare a div in fragment, done in vertex
- Free 2 vec2 for 1 float in vertex shader, and spare a mul in fragment
- flip coords due to tate: use mix_step instead of if/then (seems a bit faster)
- Remove antimoire function, it is now a generic slotmask(fake) width override. …Set it to 1.0 and use Slotmask(fake) offset instead, to have the old behavior. …It should provides a performance boost over the previous method.
Useful links
- 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. - Texture “source” projects for main monitor frame/bezel and other misc files has been moved to another repo to lower the download size.
- More presets and additional artworks: koko repo || estefan3112 repo || Starman99x repo || Duimon 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)
Hires content
Overmasked
Antialiased
Mask experiments
Handhelds
Ntsc selective blurring and sharpening
monitor-Commodore_1084S-Night
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