MiSTer-devel / GBA_MiSTer

GBA for MiSTer
GNU General Public License v2.0
143 stars 44 forks source link

Feature Suggestion: Shaders and gamma setting. #146

Open TsukiZero opened 4 months ago

TsukiZero commented 4 months ago

Particularly like the ones used in the mGBA emulator, specially the GBA Color shader by Pokefan531 and hunterk, as it makes the games less harsh on the eyes when playing on a TV. Or at least a Gamma setting. Here's an example of the difference it would make: image No changes

image 1.5 Gamma

image GBA Color shader

image GBA Color shader + 1.5 Gamma

RobertPeip commented 4 months ago

Did you miss that the core does offer comparable options already?

In the OSD -> Audio & Video -> Modify colors

TsukiZero commented 4 months ago

They are too static as they are, and again there's the lack of Gamma option, so there is no way to simulate the dark screen the GBA has. Couple that with GBA games that were designed with the dark screen in mind but forgot to account for the possibility of Gameboy Player or playing on TV and then not giving the brightness options in game. Some games account for that (Zelda and Summon Night Swordcraft Story, Doom, Duke Nukem...), but the majority doesn't.

And even Nintendo acknowledged that, as evidenced the Nintendo Switch Online having a darkening filter always active on GBA games that actually makes them look real nice.

RobertPeip commented 4 months ago

There are different brightness options and color shader options, all of which will also make the image darker, so i don't see why you would say that there is no way of simulating the darker screen?

The shader options even include the gamma applied in numbers (2.2, 1.6 and 1.4).

grafik

TsukiZero commented 4 months ago

Watched someone try to look for a good color filter in the available options for their DKC2 playthrough and none of them looked like they had gamma applied at at all, just lowered color/saturation.

RobertPeip commented 4 months ago

The gamma is present here:

https://github.com/MiSTer-devel/GBA_MiSTer/blob/master/rtl/gba_gpu_colorshade.vhd#L31-L56

Where each color valuie (0-31, 5 bits) maps to a 10 bit value depending on the gamma, then after the "shader" is converted back.

If you want it different or if it's not good enough for you, you can try to set different values there, maybe you even get some from mGBA, the code should be public.

As the code does indeed apply gamma, I have no clue what you expect otherwise, sorry.