New CRT shader from Guest + CRT Guest Advanced updates

Or maybe, instead of constant 1.5 for all interlaced content, something like this: (assuming 1.5 is our desired value for horizontal resolution of 640 px and we don’t want to go over 2.0)

float icoeff = min(global.OriginalSize.x / (640 / 1.5), 2.0);

float fdivider = max(min(mix(prescalex.x, prescalex.y,TATE), 2.0), icoeff*float(interb));

2 Likes

It should function indeed. Meanwhile you can use such a solution if it works for you. But something similar will be included in the next release.

2 Likes

@guest.r, was the “prescale-x factor” function removed?

1 Like

Not removed, it’s now automated, based on the pre-scale ratio. Works really well, no need for manual tuning tbh.

1 Like

@guest.r

Feedback:

When using slotwidth 6.0, mask size 2.0 with shadowmask 2 and 6, instead having black bars with that pattern RRGGBB you get BRRGGB.

Mask looks like number 2 or 5 on background with only one color/shade. :male_detective:

2 Likes

That’s really weird and is fixed in newest versions:

Perhaps, if someone else confirms the discrepancy also, i’ll have to take a closer look.

Settings:

shadowMask = "6.000000"
maskstr = "1.000000"
masksize = "2.000000"
slotmask = "1.000000"
slotmask1 = "1.000000"
slotwidth = "6.000000"
double_slot = "2.000000"
3 Likes

This is on a GTX 980 Ti on Linux:

4 Likes

Can you test this version? Only crt-guest-advanced version is altered…

https://mega.nz/file/wlIUBTTY#qp5heEoG4Z1Q8t0u6PQLMUbkjgfkGmLBq7pemn7T22A

2 Likes

Still the same pattern with default preset.

2 Likes

Thanks for testing. Guess i needed to rework the slotmask function. Discrepancies happened before also…

Here is a new test version if you guys can test it…

https://mega.nz/file/5hhSCSYC#j5_hn_IPTFI5aXqYkQXU0e7Xw-ccq5bieRGr44t_TlU

2 Likes

This time one black bar is 5px wide and the other is 7px wide.

1 Like

Thanks for testing it again. These rounding errors and discrepancies are a real pita sometimes… Here is a version which works for me with different testings…

https://mega.nz/file/l9B0mQJJ#3OTmdxC8yEo-Vin0bi9S5Nq-LA-Njxnji_m-Bh3Q2jU

4 Likes

Yes this time it works, looks correct on my side. :handshake:

Also i suggest shifting the black bars 1 pixel down with double_slot 3.0

Everything will be centered and look better (black bar in center of scanline).1

3 Likes

Hey, that’s good news. I’ll try to make a regular release tomorrow. Regarding that vertical shift, it’s really situational, but i’ll give it further thoughts. Some testings were already made to mitigate moire, but it’s not this trivial.

4 Likes

I was curious if that method kokoko3k was using to somewhat align the scanlines to the mask would be applicable here, he got some good results in his usecase

3 Likes

Probably not with the pass structure and code sequence, as i understand masks should be calculated before scanlines for this.

I have nevertheless implemented some slotmask mitigation code for better appearance, but it’s a trade-off regarding slotmask strength in scanlines…

2 Likes

New Release Version (2023-02-25-r1):

Notable changes:

  • Slotmask should work now in proper sequence and with different adapters without previous hacks.
  • Unused variable cleanup (main pass, standard version).
  • Filtering adjusted in interlaced mode so it’s not stronger with x-resolutions lower than 400.0.
  • Slotmask interaction mitigation code implemented. It can also mitigate moire, but it’s a trade-off.

Download link:

https://mega.nz/file/QoZlDJDB#zau7j7i5qExJ8h9bIvvUoNSbS1a074ZmK-ixuAWt77U

12 Likes

This is the most interesting part of the update for me. From what I understand it sounds like you can reduce moire by lowering slotmask strength, is that how I should interpret the “trade off”? As you and everyone that uses my presets know I use slot mask strengths at max 100 percent no exceptions. Please explain a little more about that part of the update, I’m not home at the moment to test this out myself.

Also a bit curious about this as well.

1 Like

Slotmask presence is mitigated in scanlines for a more even appearance, also with darker pixels. But it’s purely optional and strength can be regulated. The trade-off is you can’t have full slotmask strenght on already dark sections with this.

Here is a comparison with a slotmask preset:

normal:

slotmask mitigation:

With just regulating slotmask strength you can’t mitigate the slotmask strength in scanlines, that’s new here.

No worries here, you can read the discussion a couple of posts above.

9 Likes

I’m glad this is optional for the “if it ain’t broke” crowd. I get that there are things that can be improved but I’ll share with you some screenies from my latest work in progress.

5 Likes