Koko-aio shader discussions and updates

The smaller the image, the more the moiree, zooming out is expected to make things worse.

As a general rule, lowering the scanlines strength helps. This could be done via DO_PIXELGRID_H < 1. 0 (check config.inc for reference) or by allowing halo to cancel the mask and highering the halo strength (HALO_VS_SCAN >0).

Other parameters that are trickier to setup but may help or make things worse: PIXELGRID_MIN_H/MAX_H

This last one proved also to trick my eyes by making moiree less visible: PIXELGRID_OFFSET_CORE around 0.12-0.3

Lot of things.

1 Like

ok, DO_PIXELGRID_ at 0.85 and HALO_VS_SCAN at 0.16 mitigates a lot, that’s just fine now :-). Still a lot to learn, many thanks!

2 Likes

@kokoko3k - is there a way to add/create a BGR layout for the phosphors? we have GM, RGB etc etc.

The preset RBG s the number 5. it gives BGR by repeating itself: RBGRBGRBGRBG

But if for whatever usecase you need it to start from B (eg, adding a gap and make BGRX), then you are free to draft your own mask by disabling presets (preset number 0) and then move the virtual r,g,b phosphor position inside the virtual triad slot space.

Is is explained in docs-ng.md text file:

Mask type preset:
        You can have the shader generate a preconfigured mask for you:
        1:gm 2:gmx 3:rgb 4:rgbx 5:rbg 6:rbgx
        (GreenMagenta, GreenMagentaGap, RedGreenBlue, RedGreenBlueGap, RedBlueGreen, RedBlueGreenGap)
        beware that due to limitations of the actual implementation, masks ending in "x"
        works reliable when emulating slotmasks only at screen coordinates with multiplier = 1.0
        ...or with 0, you can draft your own by using the following knobs:
            Phosphors+gap count (mask size):
                How much phosphors or blank spaces the final mask will have.
            R,G,B, Shift:
                The position of every phosphor.
            Example 1: Phosphors+gap count=4 and R=0 G=1 B=2
            ...will give you a mask with red,green,blue and a blank space.
            Example 2: Phosphors+gap count=2 and R=1 G=0 B=1
            ...will give a mask with green + a mix of blue and red (magenta)
            Example 3: Phosphors+gap count=3 and R=1 G=1 B=1
            ...will give a mask with a blank space, the neutral white color and another blank space
            Example 4: Phosphors+gap count=1 and R=0 G=0 B=0
            ...like the previous one, but without any blank spaces.

Cell size multiplier allows you to zoom the mask, so that is will be easier to see what’s going on as you shift the phosphors position

3 Likes

Many thanks again.

K

Taking a break from WIP presets and phosphorgrid, because I’ve had some ideas regarding selective ntsc artifacts blurring.

First is to revert the logic so that instead of pushing the blur power on artifacts, the shader now subtracts blur power from “unartifacted” zones; this does not change the final result, but allow for a more straightforward workflow; you first blur everything ensuring that
"The Damn Waterfall ™ ® ©"
Is well blended,
next , you tweak artifacts treshold and cancelling blur power.

The real improvement comes from the idea to cancel not only the common blur, but even the CVBS chroma bleed; this allows for (albeit less accurate emulation of the real thing), more sharp image:

All the ntsc related parameter have been moved to the artifacts sections.

11 Likes

Hi Kokoko3k, I really like what I see. I had been hoping for a long time to find an “NTSC” effect that was not too strong but still effective and functional. We didn’t have this format, but still many products of the 8Bit and 16Bit era were meant for the American and Japanese market. So this idea of yours would allow us to get closer to this without however having an excessively strong effect for us Europeans. And furthermore, personally, I don’t look for accuracy, on the contrary I look for “improvement” solutions but with the feeling of the time. This solution of yours is fantastic for me. Thanks for your work.

1 Like

Just for my curiosity: would this solution, with FXAA activated, make the image less sharp and more blurry?

FXAA is applied almost before everything and affects everything regardless of the NTSC artifacts, so this change does not affect FXAA at all.

5 Likes

Excellent, and the result is really beautiful. Thank you.

1 Like

Hi there. I noticed bloom seems to have changed (lastest code as of this morning), and seems to have an issue with same games/res(?).

Can you check the opening on R-Type via Mame? You should be able to see the issue as the letters R-Type scale in from the side.

Update: The issue seems to be caused by the delta renderer - I have disabled it now.

1 Like

Ok, good to know, but I’m unable to reproduce. Can you post the preset where you notice the glitch? Maybe I understood, you notice the bloom lagging behind?

1 Like

AMD Vulkan. Yes, it’s like an odd jittery ghosting effect, not like nornal Bloom.

I used tv-PAL-my-old.slangp as a base, and then modified it to these settings:

Ok, if you need/want delta render, you may try to higher “Delta render area size”; it should depend on the bloom radius, i guess. I’m disablind DR by default till i sort it out.

I’ll just leave Delta disabled for the time being.

1 Like

I slightly changed a function that modulates the weight of the scanlines and phosphors. It is a bit faster and should allow for better mask gamma control in the future.

Btw, even if the result on the paper should be almost, but not 101% the same, I’m unable to spot differences in the final result.

Can you confirm? Thanks!

1 Like

Testing atm, but so far nothing negative is jumping out. Same settings zoomed in by 1900% seem to look the same.

1 Like

Just scrolling down the posts, and noticed i didn’t answered to this.

You can try to forget about corelevel resolution thing for the phosphor width, stay at screen resolution ( set x resolution=1) and then use the size multiplier of the triad mask to make it bigger ( Cell size multiplier x > 1) ,

I’d try 1.5x or 2x for a start; keep in mind that probably only some specific sizes will be glitches free; it depends on the mask size you use (gm is size 2, rgb is size 3), so keep searching for the sweet spot :slight_smile:

Edit:

As a correction about the glitches, just set ‘allow fuzzy screen coords’ to get rid of them.

3 Likes

Hi Kokoko3k, thanks for the advice. Unfortunately everything runs smoothly with my smartphone until the moment I go to change, as you recommended, the values of the phosphor mask. As I change something everything freezes. Tried several times already, with updated phone and updated retroarch itself. I’ll wait for the presets of your future final version, because right now I can’t experiment with anything like this. Thanks a lot for your work.

Weird! Does it freeze for all the params or just phosphors ones?

1 Like