Real GBA and DS-Phat colors


#81

So with your shader, I could go with this for the gba:


parameters = "display_gamma;target_gamma;overscan_percent_x;overscan_percent_y;sat;lum;contrast;r;g;b;rg;rb;gr;gb;br;bg;blr;blg;blb"
display_gamma = "1.400000"
target_gamma = "2.200000"
overscan_percent_x = "0.000000"
overscan_percent_y = "0.000000"
sat = "1.010000"
lum = "1.000000"
contrast = "1.000000"
r = "0.740000"
g = "0.680000"
b = "0.680000"
rg = "0.085000"
rb = "0.085000"
gr = "0.245000"
gb = "0.245000"
br = "0.000000"
bg = "0.245000"
blr = "0.000000"
blg = "0.000000"
blb = "0.000000"

This one is for nds:


parameters = "display_gamma;target_gamma;overscan_percent_x;overscan_percent_y;sat;lum;contrast;r;g;b;rg;rb;gr;gb;br;bg;blr;blg;blb"
display_gamma = "1.800000"
target_gamma = "2.200000"
overscan_percent_x = "0.000000"
overscan_percent_y = "0.000000"
sat = "1.040000"
lum = "1.000000"
contrast = "1.000000"
r = "0.750000"
g = "0.690000"
b = "0.800000"
rg = "0.060000"
rb = "0.060000"
gr = "0.220000"
gb = "0.100000"
br = "0.000000"
bg = "0.245000"
blr = "0.000000"
blg = "0.000000"
blb = "0.000000"

So far, this extended image adjustment shader is good. It can reduce the white overlap limit and does the gamma better than what other gamma shaders could do.

Edit: I got some news related to the real GBA hardware. If you put it at direct sunlight, it looks near to nds shader while being slightly darker, and took photos and videos of it. I have to put a pic of it. Everyone saying about the blue-purple and yellow-green on some shades is somewhat true when put on direct sunlight. Maybe games like castlevania looks better on sunlight. It’s just a non modded GBA screen.


#82

I’m not sure I have applied them correctly, but your accurate colors with lcd-grid make for a hell-of-a-beast screen emulation. What I find strange though, is that lcd-cgwg (https://github.com/libretro/common-shaders/blob/master/handheld/lcd_cgwg/lcd-cgwg.cgp) is expecting motionblur-simple to be ran alongside. I find that strange as it is said the original GBA does not suffer from motion blur.

I might have applied it wrongly, though, as the textures with motionblur-simple become blurry without movement using “don’t care” for scale, but not using “5x”.

Still, I love the effect of lcd-grid, and I couldn’t go without these accurate colors. I’m left wondering if this and lcd-grid on top mimic the real thing (quite close enough), and about the possible superflousness of motionblur-simple.


#83

The GBA screen definitely suffered from ghosting resulting from the poor response time. It also seems to have used some sort of looks-like-interlacing trick (darkening every other scanline on every other frame, according to a thread on nesdev) to lessen the impact.

OTOH, it’s an undesirable effect, and if it’s not required for functionality in any games, you can probably let it go without losing too much authenticity.


#84

These statements make sense.

For reference, here are the combinations and their results:

But if in between them the motionblur is added (also set to “don’t care”), it gets somewhat washed out: http://i.imgur.com/JY4eOto.png

And if the “scale” setting of that 4th pass (being motionblur) is set to “4x” (although integer fullscreen on the 1080p – here – scales 6x), the wash out diminishes and everything becomes nicer: http://i.imgur.com/dKGH0Fx.png

EDIT: I don’t know if it’s just the way I’ve configured it, but the motion-blur shader gave me motion sickness – and, I’m not normally prone to that. If that’s the way it is, I’m not recommending it.


#85

Great work Pokefan, you must be getting tired of doing those settings again with every method possible. :slight_smile:

I updated the pack with the border/lcd-grid/2x to 6x. You have LUT and no LUT method (with Hunterk image adjustment shader).

I reduced the LUT version contrast a bit to make it similar to the noLUT version (and because many games don’t need the high contrast I used before). You can change it anyway in the shader options.

For the noLUT shader I added a second image adjustment pass after the lcd-grid to push the luminance (can’t do all with just 1, did some tests and it was bad).

Getting those results:

GBA colors (shader method) / noLUT LCD / LUT LCD

The noLUT has greener blue (you can adjust it though) a bit more imprecise gradient, is a bit harder to adjust depending of games (if you want to push/lower the contrast). That said it’s probably the closest to the original GBA screen from what I could see (people making decent videos on youtube, they are few! and it’s hard with this poor screen).

I still prefer the LUT as an “ideal screen” rendering. You’re free to disagree. :stuck_out_tongue:

The difference gets bigger sometimes:

GBA colors (shader method) / noLUT LCD / LUT LCD

Well, you’re always free to spend hours tweaking with all the options we have now.

Newer version here


#86

I just uploaded the new version only with hunterk’s extended image adjustment, modified by me to apply the color matrix. Added gba-shader-high.cg to replicate how the gba looks like when put on sunlight like how I mentioned last post. Will post pics comparing it with real hardware soon. Also included the .cgp lcd variants too.

I also kept my old LUT package incase if people want to use it for better dark contrast. I will keep the link for it because of advance reasons on contrast on certain games, like what Tatsuya79 stated.

As for the new shader, i want to thank hunterk for finding an advanced image shader, which help me create the LCD shaders for both, gba and nds.


#87

My pleasure :slight_smile:

You’re doing great stuff here. I’m glad I could help.


#88

Tried the GBA “high version”. It’s getting a bit of that fluorescent tint of the unprocessed picture. I think that’s a bit too much.

The DS shader is awesome, an improvement over the LUT: more contrast, deeper colors, really good settings. Great work.


#89

[QUOTE=Tatsuya79;22877]I still prefer the LUT as an “ideal screen” rendering. You’re free to disagree. :stuck_out_tongue:

The difference gets bigger sometimes:

GBA colors (shader method) / noLUT LCD / LUT LCD

[/QUOTE]

I probably am the farthest thing away from an expert on this, but doesn’t it just looks like over-luminance in the LUT-less shot?

EDIT: although I am thoroughly happy with the results – I’m not even feeling like using the image-adjustment pass here, strangely!


#90

[QUOTE=twipley;22901]I probably am the farthest thing away from an expert on this, but doesn’t it just looks like over-luminance in the LUT-less shot?

EDIT: although I am thoroughly happy with the results – I’m not even feeling like using the image-adjustment pass here, strangely![/QUOTE]

The “GBA colors” shot is just Pokefan settings, I didn’t push the luminance there. You can see in the noLUT shot, where I pushed the luminance to make up for the LCD pass loss, it is quite similar in the end.

This kind of low contrast feeling is just how the real GBA screen was, a cheap LCD. It’s hard to make a strong contrast from that, the LUT does it a bit: it regains a bit of deeper colors here and there, but still leaves some parts a bit washed-out, with variations from games to games depending of what their makers did.


#91

[QUOTE=Tatsuya79;22902]The “GBA colors” shot is just Pokefan settings, I didn’t push the luminance there. You can see in the noLUT shot, where I pushed the luminance to make up for the LCD pass loss, it is quite similar in the end.[/QUOTE] Hmm. I was actually comparing both LCD versions. I’m not informed enough on these matters to distinguish between contrast and luminance.

Oh well. Nice stuff!


#92

I updated the package for gba and gba-high to adjust it a little. I made some comparison of the hardware with the lcd shaders. However, the camera is somewhat challenging to capture, but in vision, the output looks more identical to the right when put in direct sunlight. The last snapshot was from a youtube video, and I had to color correct it to try to match.

http://imgur.com/GvXMITt (Left - gba-shader / Mid - capture / Right - gbahigh-shader) https://www.youtube.com/watch?v=pC1HNYNg04I

I’d just keep both shaders and the LUT for your preference on display. Sometimes, the hardware looks like the left depending on the lighting and probably gba-sp.


#93

The new “high” is better. It’s like the standard shader at 1.6 gamma, but it keeps the colors from turning pale. Great for Castlevania 1, Metroid, etc.

It can be a bit aggressive on the lighter tones though.


#94

but old is gold


#95

I should point out that I made a revised LCD shader, which I posted on the old byuu forums before they were wiped. I’ve converted it to Cg for RetroArch and posted it here.

It includes parameters for specifying the three primary colours, a toggle for BGR layout, and a four-parameter tone curve:

f(x) = (gain * x + blacklevel)^gamma + ambient

which is admittedly more realistic for a CRT, but is still fairly flexible.

If one were serious about simulating the colours on a particular model of GBA or DS, the ideal way would be to measure the primary colours and their tone curves using a colour meter.


#96

[QUOTE=cgwg;23020]I should point out that I made a revised LCD shader, which I posted on the old byuu forums before they were wiped. I’ve converted it to Cg for RetroArch and posted it here.

It includes parameters for specifying the three primary colours, a toggle for BGR layout, and a four-parameter tone curve:

f(x) = (gain * x + blacklevel)^gamma + ambient

which is admittedly more realistic for a CRT, but is still fairly flexible.

If one were serious about simulating the colours on a particular model of GBA or DS, the ideal way would be to measure the primary colours and their tone curves using a colour meter.[/QUOTE]

Awesome, thanks for posting it. Don’t hesitate to mention any new shader you make on this forum, I really like what you do.

I see it fixes an issue I noticed with the old version (or the conversion perhaps) where you’ll sometimes get a thin black vertical bar on the left of the screen, depending of the resolution / multiplier you use. It lost the Grid setting though, not that I changed it a lot anyway…

Gonna check it more… :slight_smile:


#97

Woah, looks nice!

Suppose one just wants to pair up pokefan’s accurate colors with cgwg’s (welcomed!) revision (lcd_cgwg_2.cg),

would the following cgp-file code be right?

shaders = "2" 
shader0 = "gba-shader.cg" 
filter_linear0 = "false" 
scale_type_x0 = "source" 
scale_x0 = "1.000000" 
scale_type_y0 = "source" 
scale_y0 = "1.000000" 
shader1 = "lcd_cgwg_2.cg" 
filter_linear1 = false 
scale_type1 = "viewport" 
scale1 = "1" 

#98

[QUOTE=twipley;23024]Woah, looks nice!

Suppose one just wants to pair up pokefan’s accurate colors with cgwg’s (welcomed!) revision (lcd_cgwg_2.cg),

would the following cgp-file code be right?

shaders = "2" 
shader0 = "gba-shader.cg" 
filter_linear0 = "false" 
scale_type_x0 = "source" 
scale_x0 = "1.000000" 
scale_type_y0 = "source" 
scale_y0 = "1.000000" 
shader1 = "lcd_cgwg_2.cg" 
filter_linear1 = false 
scale_type1 = "viewport" 
 

[/QUOTE] I would remove the scale1 line (as in the quote). Just let it scale automatically, works OK usually.


#99

thanks! :slight_smile:

please lengthen your message to at least 10 characters.

#100

The new LCD is great. It’s a lot crisper. Each pixel is a lot more separated from every other, the grid is thicker. It makes for a slightly darken image but with the gain option that doesn’t matter much.

The non integer scaling is perhaps a bit better? I’m not sure. In this scenario a gain above 1.2 makes it obvious though, you don’t want to go there.

I played a bit with the RGB settings and they are quite different from the image adjustment pass as they change the sub-pixels and not the whole image I guess. Are you trying to use them Pokefan? (just asking as in that case I’d better wait to update my cgps if you release something different soon)