Monochrome LCD shader?

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
tobiasvl
Prole
Posts: 29
Joined: Mon Oct 01, 2018 4:58 pm
Location: Norway
Contact:

Monochrome LCD shader?

Post by tobiasvl »

Hey! Does anyone know of a shader that mimics old monochrome pixel LCDs, like those found on graphing calculators? Something like this.

The original DMG Game Boy used a similar display, maybe there's a better chance of finding a shader like that out there? I did find this one, which looks pretty much perfect, but I don't know much about shaders so I have no idea if that's easy (or possible) to integrate with LÖVE...

Thanks for any insight!
JJSax
Prole
Posts: 47
Joined: Fri Apr 04, 2014 3:59 am

Re: Monochrome LCD shader?

Post by JJSax »

I'm a little busy to test it out right now but I believe the Moonshine Library has an effect that mimics gameboys. The effect is called dmg. I found it in this curated list.

Moonshine: https://github.com/vrld/moonshine
curated library list: https://github.com/love2d-community/awesome-love2d

edit: I found some time. here is what the effect looks like before and after.
Untitled.png
Untitled.png (115.98 KiB) Viewed 5450 times
tobiasvl
Prole
Posts: 29
Joined: Mon Oct 01, 2018 4:58 pm
Location: Norway
Contact:

Re: Monochrome LCD shader?

Post by tobiasvl »

Oh, yeah, I did see that one, but it's not really what I'm after. All it really does is restricting the palette to 4 green colors, but I'm looking for something closer to an actual graphing calculator or DMG screen, more akin to the shader I linked to. Sorry if that wasn't clear.

Specific stuff I'm looking for in addition to the palette is the visible pixel grid on low-resolution monochrome LCDs, drop shadow on the lit pixels, etc.

Like this, from the page I linked to above:

Image
User avatar
zorg
Party member
Posts: 3441
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: Monochrome LCD shader?

Post by zorg »

There's a löve game on steam called Warlock's Tower that has this style; code's obfuscated though so no luck learning from it, however two things i can add to this conversation:
- Combining the 2-bit/4-color shader with a shader that makes a pixel grid like that could work; not sure if that exists as a moonshine shader yet or not,
- The other thing is that the aforementioned game might have actually been designed (like most gameboy games) to fit the screen and the palette; if you just want to drop this effect on as a shader, stuff might not look right anyway due to multiple reasons like the thresholds not being what you expect, and so on.
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
User avatar
raidho36
Party member
Posts: 2063
Joined: Mon Jun 17, 2013 12:00 pm

Re: Monochrome LCD shader?

Post by raidho36 »

I'd actually advise against it - beyond aesthetic value, it's a terrible way to display graphics in every conceivable way. Ask anyone who owned a gameboy - they hated its screen.
JJSax
Prole
Posts: 47
Joined: Fri Apr 04, 2014 3:59 am

Re: Monochrome LCD shader?

Post by JJSax »

tobiasvl wrote: Tue Oct 29, 2019 10:22 am --snipped
I'm looking for something closer to an actual graphing calculator or DMG screen, more akin to the shader I linked to. Sorry if that wasn't clear.
Yeah I figured it wasn't perfect, and you were clear. that's just the closest one I'm aware of.
tobiasvl
Prole
Posts: 29
Joined: Mon Oct 01, 2018 4:58 pm
Location: Norway
Contact:

Re: Monochrome LCD shader?

Post by tobiasvl »

raidho36 wrote: Tue Oct 29, 2019 2:05 pm I'd actually advise against it - beyond aesthetic value, it's a terrible way to display graphics in every conceivable way. Ask anyone who owned a gameboy - they hated its screen.
Hehe, yeah, not going to argue against that. I owned a Game Boy myself, and as a matter of fact I have later modified several Game Boys with backlights to get better screens. But this is for a very specific emulation use case, not for a marketable game.
zorg wrote: Tue Oct 29, 2019 1:17 pm There's a löve game on steam called Warlock's Tower that has this style
[...]
- Combining the 2-bit/4-color shader with a shader that makes a pixel grid like that could work; not sure if that exists as a moonshine shader yet or not,
Thanks, interesting game. The palette isn't really the interesting/hard part though, it's everything else! And there's no Moonshine shader with a pixel grid that I've found.

Maybe I'll have to learn this stuff and see if the shader I linked to can be ported to LÖVE/Moonshine...
User avatar
kicknbritt
Citizen
Posts: 96
Joined: Sat May 30, 2015 2:15 am
Location: Chicago, IL/Anchorage,AK

Re: Monochrome LCD shader?

Post by kicknbritt »

You could probably use that same gameboy shader and simply draw lines over it (the number of scanlines being width*height of the screen) inside a canvas scaled to the screen resolution.
"I AM THE ARBITER!!!" *Pulls out Energy sword and kills everything*
Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot], sbr2729 and 21 guests