Optimal shaders, AR and visual settings

So, the only way would be to have Blargg or someone else create a series of these filters for each system? That seems time consuming.

What about CRT-geom-interlaced-flat? It works well with most systems and is very similar to NTSC-RGB. Could the gba/gbc emulators be adapted to be able to run it?

Re: GBA on CRT, good point! I had totally forgotten about the Gamecube player.

There’s even a device called “TV de Advance”. You can read about it here, and see screenshots of the display: http://www.disgruntleddesigner.com/chrisc/gotRGB/screenshots.html http://www.disgruntleddesigner.com/chrisc/tvde.html

As I said, I don’t think it’s a good idea to try to replicate the gba screen on a big modern display. GBA on a crt however was possible, and is closer to the look we should be striving for today.

You should be able to use the CRT shaders with GBA/GBC already, AFAIK. Are they not working for you?

No, I get a completely blank screen. I can hear the sound, so everything else is working.

CRT-geom is a bSNES XML shader. I can get cg pixel shaders to work with GBA/GBC.

Oh yeah, weird, I’m getting the same thing. I could have sworn I used them before… Maybe I’m just remembering CRT-simple, which seems to work fine, at least, as does caligari’s scanlines.

While we’re on the topic of CRT-geom, where is it maintained? The one I have is from a blog post from July, and I’m wondering if there’s been any updates since then.

Edit:

This is all I can find on github:

I changed as many of the parameters as I could to remove the curved aspect, to make it more like the flat version. This one does work with gba. The edges are still curved slightly, which I can’t figure out how to turn off. I think this version is meant for Doxbox.

When I use it with bsnes it doesn’t seem to want to use the whole screen. Scanlines are nice. It might have some kind of integer scaling built into it.

I don’t think there’s any official repo or anything. cgwg occasionally posts updates in the phosphor3x thread on byuu’s forum but I don’t know that it’s under active development or anything like that. Screwtape’s higan repo at gitorious has the currently latest version and he tries to keep up to date with it, so I would probably use it as a standard reference.

EDIT: To make it flat, just set cornersize (line 107) to something small, like 0.001 and cornersmooth (line 110) to something large, like 8000.0. Then, comment out (i.e., put two slashes in front of it, like this: // ) line 141, #define CURVATURE.

I’ll see if I can figure out why this one works with GBA and the other doesn’t…

Tried that. Much, much brighter than Blargg NTSC-rgb. If it were made to be more like Blargg NTSC (or if a third pass NTSC shader was based off of Blargg’s) then it would be ideal. It would probably work with a lot of different systems.

Lord hunterk, Great Keeper of All Shader-y Things

I can’t seem to find the “retro.cg” (the one that accentuates individual pixels to make them “blocky”) in any of the repos (gitorious, libretro or TheMaister’s).

Do you happen to have it saved somewhere by any chance? It was quite a nice effect.

I have it: http://www.mediafire.com/?c268vqjdnre7qa1

Can’t tell you where I got it, or what version it is.

How do I apply several shaders at once? Can I use any shader together with another?

Is there a shader that have good results with every core?

Thank you very much good sir, you’re a gentleman and a scholar!

By googling tidbits from the file you gave, I was able to trace the shader back to Hyllian’s gists and what seems to be a final version https://gist.github.com/1064142

Thanks again =)

@arokh To apply multiple shaders, you’ll need to use the FBO/2-pass options. The way this works is you enable the FBO and set a scale. This tells it which scale to apply the first shader, which is important for shaders that are designed to use a specific scale factor, such as hq2x. Then, choose the second shader to apply. Unfortunately, you can’t mix XML and Cg shaders.

Note: some shaders are inherently multipass in their code (the halation variant of the CRT shader is one of these) and these shaders don’t like to cooperate with the FBO feature.

Personally, I think hyllian’s xBR/SABR/ddt, cgwg’s CRT and maister’s dot/dot-n-bloom shaders look good with pretty much everything.

If you’re on android, you’ll need a very powerful GPU to run any of them at full speed (my mali 400 struggles to even do scanlines…), much less with multiple shaders. The upcoming generation of phones, including Tegra 4 and Exynos5 should be able to handle them much better.

@Tanuki that’s one of my favorite shaders, too :slight_smile:

It looks great on NES-era and earlier systems.

@Tanuki that’s one of my favorite shaders, too smile

It looks great on NES-era and earlier systems.

Indeed! And with the recently added “Integer Scale” it has become much easier to use in fullscreen.

It appears the problem lies with the following line:

ilfac = vec2(1.0,floor(rubyInputSize.y/200.0));

In the modified shader that works with GBA, said line was changed into the following:

ilfac = vec2(1.0,1.0);

Truth be told, I have little experience with programming, so I have no idea what the original line is meant to do, and why it screws with handheld emulation, although the fact that it gets data from rubyInputSize probably has something to do with it. In any case, I find modifying it made no discernible difference, and it works with GB and GBA games now, so I’m happy.

@GPDP ah, sweet. Thanks for isolating that :slight_smile:

I think that’s related to the interlacing detection, which is unnecessary on pretty much everything that’s not SNES (and only matters on a scant handful of games there, but whatever), so no big loss.

Hmm, interesting. I should have expected this to be the case. It is true not very many SNES games use interlacing, but quite a few PS1 games do in one way or another. I suppose this warrants yet another version of the shader to keep around, at least for those PS1 games.

I set the resolution to 1280x720, with 4:3 correction. Results in a 960x720 image. Fullscreen, and no problems with scanlines. All even. Interesting.

Well, yeah, if you don’t crop overscan, 720p aspect-corrected to 4:3 results in a whole integer 3x scale.

Well, I do have “crop overscan” checked. But snes is 256x224 right? Though it depends on the game. In windowed a 3x scale the image is 896x672 (according to the screenshot I took).

Well, I do have “crop overscan” checked. But snes is 256x224 right? Though it depends on the game. In windowed a 3x scale the image is 896x672 (according to the screenshot I took).[/quote]

On second though, look very closely. There is actually distortion going on in that screenshot. It’s very subtle, and nowhere near as obvious as it would be with other scanline filters/shaders, but it’s there.

In any case, I got to thinking. Would it be possible to somehow change the CRT shader code to make the scanlines thinner, so they look akin to a CRT computer monitor in 640x480 mode? I actually can more or less get such a look on the version of the shader I ported to PCSX-R by increasing internal resolution. Check this out:

I do think it would be interesting to have a version of the shader that simulated a CRT monitor rather than just a CRT TV.

Edit: CRT HDTVs also had a 480p mode that looked similar to that. Just thought I’d bring that up.