Yet, another CRT Shader

It’s funny because I was going to link that same image, when I realized that you were linking to it already on your explanation.

I use that graphic since many years ago. If you study it well, 0.5,0.0 has no blocking because the point would fall as follows.

I know that rule, in the form of “b + 2c = 1” (yes, that’s the same if you didn’t notice) but I don’t think you can compare scaler results with anime, retro games or life contents for which the above rule seems to to apply to, it’s unfair, raise C and you will get ringing, no matter what (except when using ringing cancellation). Read it like this B (blur) C (sharpness) and you won’t go wrong.

Here is a comparison between my aproach and your aproach. http://screenshotcomparison.com/comparison/72695

For me, your blocking ir much more noticeable than the slightly ringing introduced by C=0.25.

See this better comparison to show these: http://screenshotcomparison.com/comparison/72704

But, we shouldn’t be arguing about subjective perception. Even your display where you’re seeing these screenshots is different from mine. Slightly artifacts will be percepted differently depending on the observer. In my setup, a C smaller than 0.3 eliminates the ringing I can perceive when playing. Probably you can see in your setup. So, this discussion is pointless.

I think I figured out a good combine method for the blur to keep sharpness: float4(clamp(blurpass - crtpass, 0.0, 1.0) / 2.0 + crtpass) Looks like this: Note: this is using a simple 2-pass gaussian blur. Sp00ky’s may look better/worse.

TBH I don’t see the blocking you talk about. I don’t deny it is present, just that when I put everything together (which you should do because we are not debuggin anything here per se), there’s nothing I find more annoying than the evident ringing. Check my comparison: http://screenshotcomparison.com/comparison/72777

I see your comparison, but add phosphor, and keep it at 1.1 scale. And if even so you see the blocking what you really should do is increase B (exact opposit of blocking), not C.

hunterk: loving that!

Increasing B just make everything blurry, it’s like taking out the glasses. I hate it.

So,for me, the blocking is evident and annoying. We can’t argue about subjective perception. As I said, I can’t see the ringing with C smaller than 0.3.

I’d say at this point, you’re splitting hairs, but it’s moot anyway, since the option is configurable.

Speaking of bloom… You can get a premium quality “bloom effect” by wearing a dirty pair of glasses. :cool:

If anyone wants to play with my halation preset (the one pictured above), you can get it here: http://www.mediafire.com/download/rtcmb … lation.zip The first pass (replace-me.cg) can be replaced via RGUI with any single-pass shader (scanlines, CRT variants, xBR, etc).

Thank you hunterk, looks really great, but very slow on my card (about 30Hz) using crt-hyllian v15 as a base.

Yeah, it’s slow because the gaussian passes happen after the scaling. You can make them come first, which greatly speeds things up, but it makes the blur chunky and requires a bunch of hardcoding in the various passes. Here’s what it looks like: http://i.imgur.com/QszhsEd.png and here’s a download for it: http://www.mediafire.com/download/bfaaf … n-fast.zip

Yes, it’s faster now, it sometimes has scratchy sound, but it stabilizes soon. I had to disable phosphor or I would get strange vertical patterns. Still get some strange vertical lines, is that normal or do I need to tweak something?

Anyway I’m gonna buy a new card soon to fix these and more problems. I think that my card being a quadro is the reason of so many strange things, it should be powerful but clearly no body codes towards quadro cards but geforce. I’m gonna get a GTX 750 if that’s powerful enough.

I think what you’re seeing there is just the poor quality blurring. You could try reducing the blurfactor values in the gaussian passes to reduce the glow and, hopefully, make it a little less obvious. But yeah, you’re probably better off just using the other version once you get your new card.

It’s an aspect ratio problem! Not only the stepping is more noticeable but check some letters and thunder icon, there’s an ugly ringing effect. I think that probably you coded it with 1:1 par on mind and since I have it defaulted to “Core Provided” (4:3) then the artifacts arise.

Now the question to follow is; what should I use for snes, 8:7 (1:1 par) or Core Provided (4:3)? Checking your SMW screenshot is easy to see, the circle is perfect in 8:7 but then games were designed with the CRT scaling to 4:3 in mind, plus RA’s default AR is also 4:3. What to do then? Is SMW the exception?

edit: I have further investigated and incorrect counter measure for the 4:3 seems to be the norm. I probably should set to 8:7, f-zero worked fine with your initial halation (no fast) shader, I guess because since it was pixel perfect it had to do so many less calculations. BUT! by further checking I think f-zero is one of those fixed at design, so it should run at 4:3, in the same boat as Street Fighter II, Mortal Kombat and who knows what else.

With the new anti-ringing code (tks to trogglemonkey), the next crt-hyllian shader will get rid of these ringings!

Here’s a version I’m working already using this: http://pastebin.com/Z7MhGXxC

This is great ! From what I’ve seen so far, this is close to perfection (and gpu usage is still reasonable). Thanks Hyllian (and trogglemonkey) !

Ok, new version with anti-ringing in the repo:

https://github.com/libretro/common-shad … hyllian.cg

Been experimenting with adding some kind of “bloom”-ish effect to this shader. Using the new FBO sRGB/mipmapping feature to do very large blurs efficiently. http://imgur.com/DC7fF4Y,PuFqLAr,NLQzFb … yP,hY6nMEO

Looks great, maister. Runs very fast, too!

Very good!

Does It work as a second shader? Or did you tweaked the crt shader?

4 additional passes (threshold, vert/horiz blur, resolve). Check out bloom/ folder.