Hyllian shaders and presets

Ok, I just updated oficial slang repo new version of crt-hyllian.

New version of crt-hyllian

What’s new:

  • Old features are back: vertical scanlines, glow (a kind of halation).
  • New internal preset for masks: classic aperture, aperture2, slot1, slot2 and shadow. You can easily change among them without the need for extra configurations;
  • Of course, custom configurations is present too for advanced users;
  • Curvature now is using geom’s advanced code, so it’s possible to tilt, for example. Good for TATE games combined with vertical scanlines;
  • New sharp scanlines (shape) implementation better for non-integer scalings than old one;

Some screens of slot and classic aperture presets:

00024-240815-185419 00024-240815-185352 00024-240815-185223 00024-240815-185024 00024-240815-185001 00024-240815-184740 00024-240815-184645 00024-240815-184637

9 Likes

Holy crap! You’re the best, Hyllian! I’ll be sure to test it in the next few days.

1 Like

I made a small update now. Added a new slotmask preset and made some user params adjustments.

crt-hyllian small update.

2 Likes

good jobs

a future hspack update?

1 Like

Are you putting that behind an overlay? A bit to dark, no?

yes it’s just that I play on my PC so I put it darker so as not to have burning eyes

1 Like

it’s better there

2 Likes

That’s much better!

Most of these improvements were obtained with hspack experimental tests. Except vertical scanlines, because they can’t be implemented in multipass the same way as in a single pass crt shader. And that’s why I had to revive crt-hyllian single pass (single crt, I mean). I’ll eventually update hspack, but not this month.

Have you tried the new tilt options? Some games look interesting using that option:

mushisam-240816-191441 mushisam-240816-191431 mushisam-240816-191403 mushisam-240816-191340 mushisam-240816-191325 mushisam-240816-191316 ibarablk-240816-191217 guwange-240816-191026 guwange-240816-191016 145705-the-great-circus-mystery-starring-mickey-minnie-snes-screenshot-240816-185800 145705-the-great-circus-mystery-starring-mickey-minnie-snes-screenshot-240816-185640 145705-the-great-circus-mystery-starring-mickey-minnie-snes-screenshot-240816-185507 145705-the-great-circus-mystery-starring-mickey-minnie-snes-screenshot-240816-185451 145705-the-great-circus-mystery-starring-mickey-minnie-snes-screenshot-240816-185435

This I got using this for shmups:

#reference "shaders_slang/crt/crt-hyllian.slangp"
SCANLINES_SHAPE = "0.000000"
geom_curvature = "1.000000"
geom_R = "4.999997"
geom_d = "0.500000"
geom_x_tilt = "0.500000"
geom_overscan_y = "83.500000"
2 Likes

I’ll just reply with a quick feedback, because I’m not finished playing with the shader yet, so I’ll only talk about things I’m sure. So far, I’ve noticed good and bad things, though a few were already fixed in your latest update (you’re fast).


Default settings

Sane choices. There are many good shaders, but few with all-around and bright defaults, demanding previous knowledge for further tweaking. Crt-Hyllian looks good out of the box, and unskilled users can promptly enjoy it, while leaving room for additional changes, for anyone else.

Masks

Still all good. Everything remained as good as the previous version, but now with presets and flexible switching between 1080p and 4k coarseness. Slot masks are faster. No green/red tint on gray areas. Top notch quality here, should satisfy anyone but pursuers of complete accuracy (though I think even they would commend your work).

Scanlines unevenness

Some problems, unfortunately. Default settings do what was promised: less unevenness even for the “sharp” option. However, things fall apart with most tweaking attempts.

  • To begin with, unevenness will never disappear, as long as the image is being scaled at a non-integer value. It can be mitigated, and a higher resolution screen with a higher pixel density might make the problem invisible to the human eye, but it’s still there. We just tackle the issue with the best possible solution, knowing it won’t be the perfect, just the most appropriate.

  • Even though the defaults are mostly fine, there’s still some edge situations where unevenness become apparent. With many different screens and resolutions, that’s to be expected, and that’s when tweaking comes. Regrettably, unlike previous versions, there’s barely any room for changing parameters without making everything worse.

  • “Sharp scanlines” are vastly affected by even small amounts of “brightness boost” and “glow”, even more than the previous “sinc scanlines” option. Although raising the “glow rollout” parameter helps a little.

  • Both scanline options are considerably affected by lowering the “min beam width” parameter by even small amounts, making it harder to control bleeding through the gaps. Specially given how the “soft scanlines” are weaker than the “gaussian scanlines” at the same settings.

  • “Scanline strength”, if upped, gives bad results even with soft scanlines.

  • Vertical scanlines work, but the problem is more apparent during scrolling. Although I play only a few games like that, so I’d rather not comment too much.

  • To control bleeding without messing the picture, I resorted to an old trick of lowering both gamma outputs at the same amount. It gets better, but not with the same degree of control from the previous versions.

Overbrightness

I like my shaders bright, close to unfiltered/raw levels of bright. While I can always achieve it easily with crt-hyllian, I noticed that my preferences became almost the bare-minimum. With every shader, sometimes the picture is too bright or too dark. There are multiple ways to remedy the situation, and it’s no different with crt-hyllian… or it used to be no different. In previous versions, there were a few options you could use to balance things out, but now:

  • “Min beam width” quickly generates uneven scanline gaps. So, you can make things brighter, but not darker.
  • “Glow” is the same as above, and unecessary when everything is already bright enough.
  • “Brightboost”, though more granular, it’s now very bright even at the lowest value. So, you can make things brighter, but not darker.
  • “Mask Dark Subpixel Strength” does not exist anymore. Although you can still make things darker with the new “mask strength” parameter, but not brighter.
  • “Scanline strength” can’t be as inconsequentionally manipulated as before.
  • NEW: interestingly, changing the default mask preset (value “0”, custom) to “Aperture 1” (value “1”) results in a more balanced brightness default without changing anything else.

Older versions let you freely make the picture brighter or darker in many different ways. There are instances where you want a specific pattern brighter, but it creates imbalance, so you darken something else and get a solid result.


All in all, the shader is improving, I just noticed how things turned out less balanced this time around. You told me a new behavior was needed for vertical scanlines. I don’t know if that’s related to the issues, but, in the case it becomes an obstacle, wouldn’t be better if an alternate version was to be created (like “crt-hyllian-vertical/tate”)? For now, that’s all the feedback I can give you. Thanks for listening.


By the way, here’s a demonstration of the “gamma trick” I need to use with the current version:

Default values (with glow)

Default values (without glow)

Gamma trick used, without glow (all other values are default)

2 Likes

Thanks for giving a true feedback. Are you comparing with latest hspack or the last version on slang shaders repo? (They’re distinct implementations). I’ll look further about the issues you pointed and try to reproduce and see what should be reverted or not.

1 Like

I didn’t specify, my bad. I try to follow the latest releases, so I’m comparing the newest (in the official slang repo) with the previous hspack from you personal repository.

I’ll evaluate if the old two params are a better way to control mask strength. Last time I checked, it could be controlled by using just one knob.

This is something I couldn’t spot any differences. For me, the old shader behave the same as the new one. I’d appreciate if you could post some example (with presets and images used) that show this clearly. I recommend turning off Glow and then compare with older implementation (as it doesn’t have glow). BTW, take your time, next week I’ll be travelling and won’t touch shaders this month.

Ok, NEVERMIND all my comments above! You’re right, my friend! After testing further I could find the culprit! Colors were clipping when BRIGHTBOOST was used. I just made a fix: https://github.com/libretro/slang-shaders/pull/624

Update it and test, please!

3 Likes

I’ve read your original post and tried to provide the screenshots, but you actually fixed the shader to replicate the previous quality (or even better). I forced many situations upon the shader and the unevenness is much less noticeable. I can still pick it on extreme cases, but it’s so easy to ignore now. I’m picky, yet satisfied, so I imagine most people won’t even notice a thing wrong. You can safely turn down the “min beam width” now, so there’s a way to balance overbrightness. Even the finicky sharp scanlines are much better, and unevenness can go unnoticed in many different cases (of course, not as easily as the soft scanlines), as long as you don’t tweak too much sensitive parameters (gamma, bright boost and glow). Finally, there’s better room to change things around, you don’t need to only rely on the defaults, which are good, but never perfect on every screen.

Anyway, I liked it very much, it’s a pretty solid work. Since it interest you, if I find any odd behavior, I’ll be sure to take a screenshot of it to better illustrate what I mean. The problem is: I don’t even know what feedback to give anymore. Everything seems stable and I can’t find how to improve the shader without going the full-accuracy route, a niche already overfilled. If I had to nitpick, I’d make two passing suggestions:

  • Color correction: provided you already offer many different mask options, why don’t you do the same with the color correction? It’s hard for me to defend something I don’t actually use, but the gray-ish previous option could be another choice, if that’s not too complicated. It wasn’t bad, and really reminded me of some CRTs. Who knows? Someone might find it nostalgic and even useful if the picture is (somehow) too dark.

  • Performance: with the old version, a plain benchmark I use to do achieved ~700fps. With the new version, it stays at ~500fps. Whereas far from being a heavy shader, performance really took a hit, putting crt-hyllian among the middleweight ones. That being said, and considering crt-hyllian-fast is a bit outdated and lacking, you could trim down some features and create a faster variant which have the old performance. The old crt-hyllian-fast could be renamed crt-hyllian-potato/mini/simple/fastest or whatever you see fit.

Regardless, thanks for your awesome work!

1 Like

Adding glow, curvature and using a monolythic crt shader take a hit on performance. It’s possible speed things up by spliting horizontal and vertical processing. The only drawback is that in order to use vertical scanlines you’d need a separate preset to swap the vertical and horizontal processing. For now it’s good as is.

1 Like

With crt-hyllian-3d, there’s a blur in text at anything but Y Res Multiplier: 1. I modified the shader so that I could adjust it by 0.01 and found that just bumping it from 2.00 to 2.01 or 1.99 would fix the blur.

On another note, the shader looks best to me when I adjust the resolution down about 0.75 of what it should be e.g. at 4x upscale, X/Y Res Multiplier at 3, instead of 4. The scanlines are smaller and closer together, and it seems like they’re more subtle but still adding that nice crt texture. I don’t know much about shaders, so I don’t know if my preference makes any technical sense.

In any case, thanks for cool shaders!

1 Like

Hi, this is a very old version of crt-hyllian, BTW. I’d like to reproduce that blur you mention, but couldn’t do it without details about how are you using this shader. Can you provide a step-by-step way to reproduce that blur and show some screenshot showing this explicitly?

If you’re not following latest updates on slang repo, I made a big update on crt-royale-fast shaders and presets: https://github.com/libretro/slang-shaders/commit/0a305b879eec074f9d620282293844c7a878fb60

  • Toned down Gamma and Brightness compared to default Royale;
  • Deconvergence is back. Figured out that using vertical subpixels deconvergence mitigates uneven scanlines in non-integer vertical scaling. Works great at 1080p!
  • Added geom’s curvature;
  • Updated crt-royale-fast (inside crt folder);
  • Updated crt-royale-ntsc-composite-fast (presets folder);
  • Added new presets: crt-royale-pvm, crt-royale-pvm-shmup, crt-royale-pvm-blend, crt-royale-pvm-ntsc-composite (presets folder).

crt-royale-pvm:

Castlevania-Symphony-of-the-Night-USA-240906-183741 Castlevania-Symphony-of-the-Night-USA-240906-183547 Castlevania-Symphony-of-the-Night-USA-240906-183439 Castlevania-Symphony-of-the-Night-USA-240906-183430 Castlevania-Symphony-of-the-Night-USA-240906-183347 01-Super-Mario-Bros-3-USA-240906-072328 sfau-240906-072246 sfau-240906-072047 sfau-240906-071922 sfa2u-240905-185051

crt-royale-fast:

Castlevania-Symphony-of-the-Night-USA-240906-183748 Castlevania-Symphony-of-the-Night-USA-240906-183337 Castlevania-Symphony-of-the-Night-USA-240906-183224 35-Castle-of-Illusion-Starring-Mickey-Mouse-USA-Europe-240905-201956 01-Super-Mario-Bros-3-USA-240905-135310

crt-royale-pvm-shmup (using integer scaling and 4:3 aspect ratio):

dfkbl-240906-163015 futaribl-240906-162114 ddpdfk-240906-120639 ddonpach-240906-112819

7 Likes

Made a small update to get even better scanlines at non-integer scalings: https://github.com/libretro/slang-shaders/pull/633

003538-240908-150233 003538-240908-150222 003538-240908-150144 03-Super-Metroid-Japan-USA-En-Ja-240908-110035 003538-240908-082756

They’re called pvm for a reason. Can you spot extreme scanline thickness variation in these screens? And the mask popping in red regions?

00024-240909-080146 00024-240909-080246 00024-240909-080253 00024-240909-080318 00024-240909-080607 00024-240909-080629 00024-240909-080639 00024-240909-080717 00024-240909-080947 00024-240909-080959 00024-240909-081055 00024-240909-081636 00024-240909-081718 00024-240909-081810 00024-240909-081924 00024-240909-082256 00024-240909-082417

If you didn’t notice, those snaps were taken at a non-integer scaling (1080p), and yet, the scanlines don’t look uneven. It’s very rare to notice any uneveness with this preset.

10 Likes

update via retroarch?

1 Like

By Retroarch as soon as the PR is accepted. If you’re in a hurry, you may just copy the modified files from my fork as indicated in the PR.

3 Likes