New CRT shader from Guest + CRT Guest Advanced updates

Well I found out that I can use Raspberry with composite video, I’m looking for a Trinitron crt, I know that probably the composite of the Pi is different from the Mega Drive Genesis, but I want to see if I can sharpen and dither blend with composite video. I don’t know if photos could really help…

1 Like

I think i’m on something here:

It’s not perfect but looks quite nice to me.

10 Likes

Look great! Could you share the parameters please?

2 Likes

@guest.r @Nesguy

In case you might find this interesting, with regards to colour matching Sony wrote this very readable 7-page whitepaper on

Colour Matching Between OLED and CRT

It says that an identical colourimetric instrument measurement of colours on CRT and OLED (i.e. theoretically the colour perception should be identical for both devices) still yield a different human perception of the colours on both devices. This because the spectral distribution of the light sources in both devices differ.

Sony argues that for the colours to more accurately match perceptually, an adjustment has to be made on the OLED to the 1931 CIE coordinates of the D65 whitepoint, the so called “Judd-Vos” refinements to the 1931 CIE model.

Sony has implemented this adjustment as a single offset on their pro OLED BVM/PVM monitors (see page 7):

This offset based on the “Judd modified correction colour matching function” will be applied to the following models effective from 2012 autumn shipping. <…>

Offset Values (from reference white point): (Δx, Δy) = (-0.006, -0.011) (x, y) = (0.3067, 0.3180) for D65

From some further reading I understand the Judd-Vos refinement offset is different per display technology (LED, OLED, Plasma) and varies also a bit per model, such that the adjustment is not a specific single value but yields a range. See the document here for information on the adjustment range per technology, mostly page 8-10:

Towards Standardizing a Reference White Chromaticity for High Definition Television

I’m not sure if this “Judd-Vos” adjustment has become industry practice by now for imlementing in hardware, but with the focus of sites like RTINGS.COM etc on measuring exact D65 1931 CIE values, I suspect it is not industry practice to include the adjustment in hardware.

As such maybe it could be considered for the shader. That said, possibly the change is too marginal to really notice unless you’re in a Sony studio looking at their OLED BVM :slight_smile:

6 Likes

It required a major rework with the shaders, but looks ready for release now. Handling the of the new feature should be quite simple…

This makes perfect sense, i also guess this is a complicated topic which could also involve other flat panel display types, calibration is also a factor. My personal factor, for example, are my glasses with an anti-reflective coating, which also alter the perceptual white point. :nerd_face:

I guess a color profile is doable without much trouble.

4 Likes

New Release Version (2022-05-26-r1):

Notable changes:

  • adaptive sharpness feature added to ntsc options
  • (works best with 2 phase coding, fringing is also supported)
  • ntsc presets changed
  • dithering shaders are replaced with the new adaptive sharpness feature

Download link:

https://mega.nz/file/BwIiWDYb#FdtQ_aB_vmj9ieJVwPt16eVego50YE1EGWZYHJi_6WM

9 Likes

Btw, just in case people didn’t know. the -hd preset can also do some blending to take the unpleasant edge off sharp dithering patterns. Obviously it won’t do NTSC colors. But if that’s what you want (original colors rather than NTSC artifacting,) it seems it’s a viable alternative.

Set “internal resolution” to “1.40” for this to work. Example:

4 Likes

Yes, it has a more advanced filter implemented. I added the same horizontal filter to the ntsc-fast version and it works great with the new sharpness features. It has to be set by a couple of parameters, but brings very nice results.

2 Likes

@guest.r

Did you do something to the color code with the latest NTSC shader? I think it looks better, but maybe it’s my imagination?

Now that I’m looking at blend mode 1, I’m not sure what the problem is? Looks like the pixels are blended correctly? My eyes are definitely playing tricks on me - I keep seeing gaps between the blended pixels that aren’t really there; zooming in confirms it: the pixels are merged. There may be a weird optical illusion occurring with the waterfall.

preview of my updated high tvl NTSC preset.

It’s quite close to this shot taken on a PVM, minus the rainbow effect. While the rainbows may be authentic to the hardware, I think it is completely reasonable to assume that this is an effect that was NOT intended by the artists.

1 Like

Are there reasons we wouldn’t want this kind of filter with the regular NTSC version?

2 Likes

I have already implemented a test version, but all existing presets would have to be tweaked again. Some ‘difficult’ decisions are also to be made about the blend modes: keep or use the new approach, including the new sharpness features.

That’s why i went with the ntsc-fast version first, see how it goes.

3 Likes

Yeah that makes sense, thanks for the answer and good luck with the difficult decisions :slight_smile:

4 Likes

I did some luma clamping to prevent clipping, hoping for beneficial results. :grin: The colors should look a bit more saturated now, which is especially important with 2-phase coding.

Default setting changed a bit, a added an portion of ‘sharpness and ringing’ for better contrast. Maybe older values play better for you though.

5 Likes

Hey! Looks like you’ve outdone yourself! At least that’s what it looks like to me!

Adaptive sharpening now works better than anything for me! It makes everything more crystal clear than the other options before, and the dither is much more uniform!!

Look at the eyes on the face in Sonic’s life counter and the “Koshiro” text on the SoR screen, it seems the sharpening makes the text more readable and eliminates unwanted dither artifacts! Sharpness is better in so many ways!!

(left: before, right: after)

PR = “0.000000”
PG = “0.000000”
PB = “0.000000”
AS = “0.000000”
sat = “0.000000”
contr = “0.200000”
quality = “-1.000000”
ntsc_phase = “2.000000”
cust_artifacting = “1.100000”
ntsc_sharp = “-8.000000”
ntsc_slimit = “0.600000”
blendMode = “2.000000”
GAMMA_INPUT = “2.699999”
glow = “0.000000”
bloom = “1.000000”
gamma_c = “1.280000”
gsl = “1.000000”
scanline1 = “9.000000”
h_sharp = “0.900001”
s_sharp = “1.500000”
ring = “0.200000”
shadowMask = “6.000000”
maskstr = “0.900000”
masksize = “2.000000”
mask_gamma = “5.000000”
mclip = “0.350000”
gamma_out = “2.100000”
post_br = “1.150000”

2 Likes

New Release Version (2022-05-27-r1):

Notable changes:

  • adaptive sharpness feature added to ntsc options (release highlight)
  • adaptive sharpness altered to preserve much more details (and it’s an option), looks really nice
  • edit: small brightness fix

Download link:

https://mega.nz/file/l1YUSB5a#n08PiHZCk1g_JeK6xmZrJj9Otag6hYbVg-3S5nNQrEM

11 Likes

Sharpness is getting better! It looks like black magic!

comparison

The thickness of the vertical bars is different, a little thinner, but if that was necessary to get that sharpness, then it’s not a problem. It really is crystal clear even with dither blending and rainbow effect!

2 Likes

New Release Version (2022-05-27-r3):

Notable changes:

  • adaptive sharpness feature added to ntsc options (release highlight)
  • adaptive sharpness altered to preserve much more details (and it’s an option), looks really nice
  • edit: small brightness fix
  • edit2: improved quality, cleanups, qol changes
  • edit3: new version, some sharpen fringing/luma artifacts removed, better overall appearance

Download link:

https://mega.nz/file/E941hKKT#8DiuaOb2bMQZi-q1s7amj-Shu5mxfMwBCFVU4U-Jrfc

14 Likes

The new adaptive sharpness feature is a major improvement. Everything that needs to be blurred is still adequately blurred but the overall perceived sharpness is now greatly enhanced. I was going to post before-after screenshots but decided not to do it because the unsharpened one actually looked better in a zoomed-in closeup. But from one-foot away or at any normal viewing distance I would definitely turn it on :nerd_face:

3 Likes

Best to use the newest versions. Ntsc shaders are very interesting as they ‘react’ differently with different games/gfx. patterns, especially with 2-phase games. Screenshots can also be deceiving as they can show only ‘one side of the coin’.

With the new sharpness feature it’s somewhat important to redo the filtering settings, i endorse the use of the fast version as it has a newer filter implemented, which is better for the ntsc pre-shaders.

Example pic:

6 Likes

Would it be possible to make a select key for the ntsc shader? I still think the old version is good, and I would like to use both, depending on the system it would be interesting to alternate, the new one is good for details and the old one has a smoother blend. Well it would be interesting to use the new sharpening in the old ntsc shader.

2 Likes