(EDIT: Oops - accidentally posted this before it was finished - let’s try again…)
Old non-backlit handhelds are easy on the eyes since viewing them is somewhat like looking at a sheet of paper. When you emulate them on a bright modern display, things can get nasty - especially when games make extensive use of white backgrounds. I was fed up of going snow blind every time I played Pokemon Pinball or Puzzle Link, so I made a very simple, very lightweight shader that (among other things) overlays pixels onto a comfortable textured background. You can download it here:
GLSL version: https://drive.google.com/file/d/1H-yuPiJW6GoRwQCY3900u1261zmoRkeU SLANG version: https://drive.google.com/file/d/1jjolwR0iiAc1CGLiyfNEvGqqIG656_kq
Whichever you download, you’ll end up with three shaders:
- simpletex_lcd: base shader
- simpletex_lcd+gbc-color: includes GBC colour correction
- simpletex_lcd+gba-color: includes GBA colour correction
They work best with integer scaling ON, and they’ll run on pretty much anything (apart from a Raspberry Pi, i guess…). I get full speed on a Fire HD 10 tablet, and just a few frame drops on my ancient phone (mtk6735p + Mali-T720 GPU).
Anyway, here are some screenshots to show what these shaders do: (in fact, lots and lots of screenshots… I want to show how they behave in all sorts of conditions…)
simpletex_lcd
A handful of black and white games:
You can also get that old-school Game Boy green effect by pairing the shader with the following Gambatte palette: https://drive.google.com/file/d/1s7AW1E0coLo3shd73qO7P1IfoqpVky6D
simpletex_lcd+gbc-color
Here’s a random selection of GBC and NeoGeo Pocket games:
simpletex_lcd+gba-color
I wasn’t thinking about the Game Boy Advance when I made this shader, but it handles the platform quite well:
I’ve tried to configure these shaders with ‘sane’ default parameters, but they are designed to be tinkered with - you’ll almost certainly want to ‘tune’ them according to the resolution/contrast/brightness of your display.
The following variables can be accessed via the ‘Quick Menu > Shaders > Shader Parameters’ menu:
-
Grid Intensity: Sets overall visibility of grid effect (1.0: Grid is shown, 0.0: Grid is invisible)
-
Grid Width: Sets effective width of grid lines (1.0: Normal full width, 0.0: Minimum width)
-
Grid Bias: Dynamically adjusts the grid intensity based on pixel luminosity (0.0: Grid intensity is uniform, 1.0: Grid intensity scales linearly with pixel luminosity)
-
Darken Grid: Darkens grid (0.0: Grid is white, 1.0: Grid is black - I recommend leaving this at 0.0)
-
Darken Colours: Simply darkens pixel colours (0.0: Colours are normal, 2.0: Colours are too dark…)
A final note on textures:
The shaders are configured to use a 2048x2048 background texture image, which is fine for any display resolution up to 1200p.
If you have a display resolution higher than this (1440p, or 4k), you will need to make some edits:
1 - Open the glslp/slangp file you are using and replace:
BACKGROUND = "shaders/simpletex_lcd/png/2k/textured_paper.png"
with:
BACKGROUND = "shaders/simpletex_lcd/png/4k/textured_paper.png"
2 - Open the corresponding glsl/slang file and (a) comment out the “#define BG_TEXTURE_SIZE 2048.0” line, and (b) uncomment the “#define BG_TEXTURE_SIZE 4096.0” line - it should end up looking like this:
// Background texture size
// > 2048 x 2048 textures are suitable for screen resolutions up to
// 1200p (or 1440p if running 'square' aspect ratio systems)
//#define BG_TEXTURE_SIZE 2048.0
// > 4096 x 4096 textures are suitable for screen resolutions up to 4k
#define BG_TEXTURE_SIZE 4096.0
If you don’t like the default background texture, I’ve included a handful of free-use textures from www.subtlepatterns.com that you can play around with if you so wish - have a look in the “shaders/simpletex_lcd/png/” folder, and just update the BACKGROUND line in the glslp/slangp file you are using.
If you are a Linux user, you can drop any tileable PNG image in the “shaders/simpletex_lcd/src/png” directory and run the shaders/simpletex_lcd/src/generate_bg.bash script to make a new background texture - feel free to experiment!