CRT-Yah! A new shader chain

Okay, then it must be something both mask generators have in common.

Regarding the mask scale, did the artifacts stay the same when you incremented the scale or did they change at least? I would expect the latter.

video scaling: custom. Coords:

265

124

828

615

monitor resolution: 1600x900

#reference "crt-yah.slangp"
COLOR_PROFILE = "-0.700000"
COLOR_TEMPERATUE = "0.600000"
NTSC_PROFILE = "2.000000"
NTSC_SHIFT = "1.000000"
NTSC_JITTER = "2.000000"
CRT_NOISE_AMOUNT = "1.000000"
CRT_CURVATURE_AMOUNT = "0.150000"
CRT_VIGNETTE_AMOUNT = "0.100000"
CRT_CORNER_RAIDUS = "0.060000"
CRT_CORNER_SMOOTHNESS = "0.200000"

A new version is on the horizon and addresses some of the recent feedback:

  • Changed NTSC Profile parameter to be continuous with fractional increments
  • Added Auto option to NTSC Quallity (Phase) parameter (suggested by @PU786)
  • Added Screen Resolution parameter to select between Auto and Native (suggested by @PU786)

    Auto is the default setting and applies the automatic down-scale to high resolutions as before. Native disables the automatic down-scale. However the minimum size of 3px per scanline is still enforced.

  • Fixed NTSC effect when using the custom scale option in RetroArch (reported by @ynnad4)

I’m still looking into those artifacts, presumably caused by the procedural mask. Unfortunately I cannot reproduce this issue yet. If someone else could help, that would be very much appreciated.

5 Likes

hi, is it available already ? Dont know how much it takes to update. Thank you for the quick fix. I still cannot see the options you mention and it still happens this twisted rainbow

The pull request I linked should have been merged by the time of your writing. I just tested updating the shaders in RetroArch and it contains the new version now.

1 Like

yeah, its very perfect now. Thank you a lot for your awesome work into this project.

3 Likes

Where can I acquire such Shader, TC?

Hi !

I am using RA to browse game pics with shaders, instead of actually playing games :innocent: (I use PNGs from mobygames) ; I have noticed with the pure- presets a diagonal line, is it because this is static content (or maybe the Image viewer (?) core), or can it be fixed with a change in parameters ?

Thanks for this nice set of shaders by the way !

I also use images to test my shader, only for effects that require motion I start a game. :wink:

But no, this is not normal, it’s an artifact that should not be there.

It could be the same issue @PU786 has reported and seems to be related to the mask settings. Can you test if the artifacts disappear when set the Mask Intensity to 0?

If you are willing to change some code for testing purpose also look at this previous post.

@Superdonkeyjack Not sure if this is the right topic to discuss your question, as it is quite basic. To get femilar with RetroArch and shaders look here. RetroArch ships with hundreds of shaders out-of-the-box (incl. this one via online updater).

1 Like

No, I mean your specific one that you’ve been updating through this thread. It looks fantastic, I tried using the one that’s the default. Doesn’t come close to what I’m seeing in that.

You can find several presets for this shader in the following folder:

crt/shaders/crt-yah/presets

1 Like

Thank you, sir. I’m sorry for being disruptive.

My bad I had this déjà-vu feeling, it was just few posts above !

With mask intensity 0 the line indeed disappears.

Using pure-lcd this time :

Changing the .h file 99% fixes it, thanks ! :smiley:

What remains is actually a split from bottom-left to top-right with 0.5 or 1 pixel shift on each side that I don’t think I’d have noticed without the previous artifacting issue : here it is zoomed 500% 500percent zoom

1 Like

Amazing work and I’m grateful to be witness to something special for CRT Emulation.

1 Like

Usually one gets rid of those kind of issues by multiplying the coordinates by 1.0001

Thanks for testing and the detailed report. I have an idea what the reason could be. These are probably arithmetic difference in how the mod, floor and other functions behave on different hardware.

@kokoko3k Yeah, there is already something like this in place, where I preciously encountered such artifacts, but not everywhere.

1 Like

@yyyeeeaaahhh I made some small changes to subpixel-helper.h. Could you manually download this file from GitHub and replace it with the one in the folder:

crt/shaders/crt-yah/common

Please tell me if anything changes. Also undo you changes the file crt-yah.fs.h.

1 Like

hmm nothing seems to have changed, after reverting crt-yah.fs.h, swapping both versions of color-subpixel-color.h give the same result with artifacting and seemingly no movement in the zoomed-in in picture

To be sure I used the right file I changed EPSILON to 7e-6 thinking it could trigger a noticeable shift, but then shader failed to compile. At least I know I was using the right file :smiley: .

Yeah, increasing the EPSILON could work. The reason why it failed to compile is that EPSILON is also defined in other .h files with the same value, which is no problem. But when you redefine EPSILON with another value the compilation fails. If you want to test whether EPSILON is the problem, you either have to change it everywhere in crt-yah or you define a new EPSILON1 and use that in subpixel-helper.h.

Maybe another thing you could test for me is, whether the Mask Sub-Pixel Shape parameter has an influence. Try to set it to 0, while using the original get_subpixel_color() function call, because the other one doesn’t use the parameter.

I have raised a new PR with the attempt to fix the mask artifacts. It tries to make the floor() result more stable by adding EPSILON, which has been increased from 1e-6 to 1e-5 as well. The definition was also moved to a central constants.h file, to play with even larger values more easily.

There was another small update some days ago, that reworks the NTSC Jitter parameter.