VOGONS


First post, by Expack3

User metadata
Rank Member
Rank
Member

Don't know if this is the appropriate place to ask, but is there a shader for emulating VGA's 256 on-screen colors? I know such a shader exists for emulating EGA, but not a lot of older games which can be injected with shaders look good using only 16 colors.

Reply 1 of 8, by leileilol

User metadata
Rank l33t++
Rank
l33t++

At that point you're just posterizing to RGB666 and needing to lookup from a larger strict palette (and you can't really dynamically generate a 256-color palette with a shader).

It could be done, but many of those games that use fullscreen flash effects would look ugly with it.

apsosig.png
long live PCem

Reply 2 of 8, by Expack3

User metadata
Rank Member
Rank
Member

I see. So, in layman's terms, I would need some way to force a particular 256-color palette onto an image via a tonemapping shader. If so, I've discovered generating a pseudo-256 color tonemap is actually quite simple.

Reply 3 of 8, by Azarien

User metadata
Rank Oldbie
Rank
Oldbie

You could try a naive RGB332 shader. Not as good as proper palette but still better than 16 colors.

Reply 4 of 8, by Woolie Wool

User metadata
Rank Member
Rank
Member

Why would you do this? The look of VGA games comes from the entire game being designed around the palette. All the art assets are created to look good with a specific set of 256 colors. Play Dusk with the low color mode to get an idea of how ugly it is to force games into 256 colors that were designed for truecolor.

wp0kyr-2.png CALIFORNIA_RAYZEN
1wpfky-2.png REDBOX
3q6x0e-2.png FUNKENSTEIN_3D

Reply 5 of 8, by Expack3

User metadata
Rank Member
Rank
Member
Woolie Wool wrote:

Why would you do this? The look of VGA games comes from the entire game being designed around the palette. All the art assets are created to look good with a specific set of 256 colors. Play Dusk with the low color mode to get an idea of how ugly it is to force games into 256 colors that were designed for truecolor.

Why are there EGA shaders floating around the Internet despite them making truecolor games ugly? Because there's an interest in mimicking the look - even if the games they're used on were never designed around the concept of a limited color palette.

Reply 6 of 8, by leileilol

User metadata
Rank l33t++
Rank
l33t++

When VileRancour and I wrote an EGA shader many years ago it was for theorizing the appearance of more EGA support drivers for more VGA games bringing what-if color reductions and the like as well as 640x200 dithering. Whether that shader goes beyond into some mega "famous" reshade repack without understanding the context is beyond my control. I've already seen my 3dfx filter shader get butchered into being a "lame pointless scanline shader" looking nothing as i've intended.

apsosig.png
long live PCem

Reply 7 of 8, by VileR

User metadata
Rank l33t
Rank
l33t
Expack3 wrote:

Why are there EGA shaders floating around the Internet despite them making truecolor games ugly? Because there's an interest in mimicking the look - even if the games they're used on were never designed around the concept of a limited color palette.

Point is, the so-called 'EGA' palette* is a fixed thing, so it's possible to write a shader which approximates its use in a game. The VGA colormap is a moving target - nobody used the default 256-color VGA palette, unless we're talking "coder colors", and coming up with one that works well throughout an entire game is a completely different thing, not a task for a realtime shader.

FWIW, I'd be very surprised if there was any measurable interest in those EGA shaders. And even more if they were mainly being used on true-color games... VGA games make better source material, and even that needs lots of tweaking. (And this is coming from a person who co-wrote such a shader, once.)

* Actually, the '4-bits-per-pixel IRGB' palette; because it didn't originate with EGA, and EGA itself could do more.

[ WEB ] - [ BLOG ] - [ TUBE ] - [ CODE ]

Reply 8 of 8, by Expack3

User metadata
Rank Member
Rank
Member
VileRancour wrote:
Point is, the so-called 'EGA' palette* is a fixed thing, so it's possible to write a shader which approximates its use in a game […]
Show full quote
Expack3 wrote:

Why are there EGA shaders floating around the Internet despite them making truecolor games ugly? Because there's an interest in mimicking the look - even if the games they're used on were never designed around the concept of a limited color palette.

Point is, the so-called 'EGA' palette* is a fixed thing, so it's possible to write a shader which approximates its use in a game. The VGA colormap is a moving target - nobody used the default 256-color VGA palette, unless we're talking "coder colors", and coming up with one that works well throughout an entire game is a completely different thing, not a task for a realtime shader.

FWIW, I'd be very surprised if there was any measurable interest in those EGA shaders. And even more if they were mainly being used on true-color games... VGA games make better source material, and even that needs lots of tweaking. (And this is coming from a person who co-wrote such a shader, once.)

* Actually, the '4-bits-per-pixel IRGB' palette; because it didn't originate with EGA, and EGA itself could do more.

Wish there was an upvote button for posts on this site, because your post deserves one for the excellent point you made. Makes sense how the EGA shaders are actually meant for emulating how a theoretical EGA driver for a VGA game would output.