Sony Megatron Colour Video Monitor

You are right, the Retroarch HDR settings have no impact when the shader is active. I don’t have lilium’s reshade shaders installed, only the Megatron ones.

I could also measure the Megatron reshade port with the AutoHDR plugin from MajorPainTheCactus again on a different emulator to see if the colors will me tonemapped differently outside of RetroArch.

But it will be complex, because I noticed too, that all Presets of the Megatron shader act differently in regards to colors too. I hope that MajorPainTheCactus (I will call him shortly MPTC in future, because to write his name everytime is pain enough :grin:) will also have a look why the whitepoint and green primary are off the targets.

And it would be very nice, if he could implement the same looking Slot Mask from the Virtua Fighter RetroArch preset into reshade too, because it looks very nice and I couldn’t get such a good result with the reshade presets (the VF preset isn’t available via reshade). The Megatron masks within Retroarch look pretty different in each preset, which makes the whole thing very complex to be honest and also as I wrote before do the colors look different in each preset, which makes it mandatory to test every preset and setting independently.

2 Likes

Today I created a Reshade Megatron Preset, which should get as close to a Consumer Sony Trintron TV as possible. Not only in terms of the Aperture Grille mask, but also colorwise.

Sony Trinitron:

Reshade Megatron shader + Windows 11 Auto HDR:

My phone camera distorts the colors a bit, in reality they look virtually the same like on the picture with the Sony TV. I think the Megatron shader nails it with W11 AutoHDR.

What do you guys think?

I also tried something funny today. I downloaded some old 90s TV advertises and some clips from old TV series like “The Fall guy” and A-Team etc. from Youtube, which many of you may know from childhood.

I watched it within Retroarch and Megatron reshade + W11 AutoHDR and I reallly thought I am watching on a CRT TV. The content I downloaded has some compression artifacts, but the shader cleans out the image so well, that even this is enjoyable.

And I also “tuned” the Reshade Megatron shader with an additional applied shader from Retroarch to soften the image ever so slightly, because I think that it looks just a bit too sharp and digital without this.

I first tried just to activate the bilinear video option within Retroarch, but this was too soft to my eyes. So I deactivated bilinear scaling and tested every single shader which is just for softening the image to my taste and I stuck with the shader:

“controlled_sharpness.slangp” which can be found in the shader folder “pixel-art-scaling”

This shader on top of the Megatron softens the image only that much, that it just removes the digitally appearing harshness. Really enjoyable and authentic looking stuff on my OLED.

I also compared how the Aperture Grille mask looks with different resolutions and TV lines within the Megatron menu and I think, that the resolution set to 8K and 800 TVL looks the best. As far as I understand, this combination results effective in 400 TVL on my 4K OLED, as the vertical resolution is half on a 4K TV. As there is no 400 TVL setting in Megatron, 8K and 800 TVL can achieve the same thing here.

The Aperture Grille mask looks just right for me like this, because it is not as coarse as 300 TVL (with 300 TVL the RGB phosphors appear slightly too big for me on a 55 inch TV), but also not too fine to look like a Sony BVM or PVM.

To get rid of any “rainbowing” artifacts with white letters etc. I set the red horizontal deconvergence to -1.00 and blue h. deconvergence to 1.00.

Try it out guys, you will be surprised how well this works with all content.

6 Likes

Since as far as i know, settings are equivalent, that’s pretty easy to port over:

Sega_Virtua_Fighter_HDR.ini

PreprocessorDefinitions=
[email protected]
[email protected]

[SonyMegatron.fx]
HCRT_HDR=1.000000
HCRT_CRT_SCREEN_TYPE=2.000000
HCRT_CRT_RESOLUTION=1.000000
HCRT_EXPAND_GAMUT=0.000000

HCRT_RED_VERTICAL_CONVERGENCE=0.200000
HCRT_GREEN_VERTICAL_CONVERGENCE=0.200000
HCRT_BLUE_VERTICAL_CONVERGENCE=-0.230000
HCRT_RED_HORIZONTAL_CONVERGENCE=0.400000
HCRT_GREEN_HORIZONTAL_CONVERGENCE=-0.250000
HCRT_BLUE_HORIZONTAL_CONVERGENCE=-1.000000

HCRT_RED_SCANLINE_MIN=1.0000000
HCRT_RED_SCANLINE_MAX=2.000000
HCRT_RED_SCANLINE_ATTACK=1.000000
HCRT_GREEN_SCANLINE_MIN=1.000000
HCRT_GREEN_SCANLINE_MAX=2.000000
HCRT_GREEN_SCANLINE_ATTACK=1.000000
HCRT_BLUE_SCANLINE_MIN=1.000000
HCRT_BLUE_SCANLINE_MAX=2.000000
HCRT_BLUE_SCANLINE_ATTACK=1.000000

HCRT_RED_BEAM_SHARPNESS=1.000000
HCRT_RED_BEAM_ATTACK=0.0000000
HCRT_GREEN_BEAM_SHARPNESS=1.000000
HCRT_GREEN_BEAM_ATTACK=0.000000
HCRT_BLUE_BEAM_SHARPNESS=1.000000
HCRT_BLUE_BEAM_ATTACK=0.000000

The RetroArch Megatron version of the preset also has expand gamut on, but as previously established, that uses alternate, non-standard Expanded709 primaries.

By the same token, we can also port the Neutral preset from ReShade Megatron back to RetroArch Megatron:

(shaders\shaders_slang\hdr\crt-sony-megatron-neutral-settings.slangp)

#reference "shaders/crt-sony-megatron-hdr.slangp"

hcrt_crt_screen_type = "0.000000"
hcrt_colour_system = "2.000000"
hcrt_contrast = "0.000000"
hcrt_brightness = "0.000000"
hcrt_saturation = "0.000000"
hcrt_gamma_in = "2.220000"
hcrt_expand_gamut = "0.000000"
hcrt_red_scanline_min = "0.500000"
hcrt_red_scanline_max = "1.000000"
hcrt_red_scanline_attack = "0.200000"
hcrt_green_scanline_min = "0.500000"
hcrt_green_scanline_max = "1.000000"
hcrt_green_scanline_attack = "0.200000"
hcrt_blue_scanline_min = "0.500000"
hcrt_blue_scanline_max = "1.000000"
hcrt_blue_scanline_attack = "0.200000"
hcrt_red_beam_sharpness = "1.750000"
hcrt_red_beam_attack = "0.500000"
hcrt_green_beam_sharpness = "1.750000"
hcrt_green_beam_attack = "0.500000"
hcrt_blue_beam_sharpness = "1.750000"
hcrt_blue_beam_attack = "0.500000"

(Note that the Neutral preset uses an alternate Colour System setting by default, specifically rec 601.)

I would strongly recommend prepending an NTSC shader for this purpose instead.

3 Likes

This is fantastic man!

I believe you!

I think you also nailed it with your settings!

This is something that I’d like to do even more. I did it a few times with some old content but found the built-in FFMPEG Core to be quite limiting.

Using ReShade you should be able to use almost any media player, including MPC-HC.

Feel free to give my MegaTron Preset Pack a spin as well, maybe you can tweak the settings in there even further than I have with the type of equipment and knowledge that you seem to possess. I do things mostly by instinct.

This is a HUGE tip here! I’m definitely going to try this out. Didn’t realize it was possible to get some “in-between” mask widths which is something that I had asked about not too long ago.

I really like things to be closer to the 300TVL mark than the 600TVL mark especially when viewing on a 55” from about 7’ away. When it’s too fine, it doesn’t feel or look similar to the way it did on an old 15" or 20" tube from a much closer distance. However, the trade-off is sometimes chunky phosphors that don’t always “fit within the lines”.

I even counted triads on real CRTs to see what was closer in terms of CRT Mask sizes and the finer ones tended to be but I still preferred my less accurate coarse ones. Hopefully this will be the sweet spot!

Thanks for this will try it out. I’ve been playing around with horizontal deconvergence but I don’t quite get its functionality. It can’t move the subpixels in the same way that vertical deconvergence does, it seems as if it offsets the content though.

Feel free to share your full preset or presets.

I agree and in my Preset Pack I have examples with both GDV-NTSC as well as Super-XBR prepended.

I’m in favour!

3 Likes

Edit - Got it working, disregard. :slight_smile:

2 Likes

By the way @Dennis1 you have to remove the space between the " @" and the user’s name if you want to tag someone.

Having the time of my life with this shader!!

CyberLab Megatron 4K HDR Game Turbo Duo_Dreamcast S-Video Smooth.slangp

Thanks again @MajorPainTheCactus and all others who contributed!

3 Likes

I am too! The Atomiswave HDR looks BEAUTIFUL on Sega Saturn games! I am going black playing games again just to see the shader in action!

3 Likes

Yeah thats not my point here - I know we’re using emulators/cores hence why I went back to using the old power gamma I’m more interested in what the original hardware was doing and how to get my SDR version working in that way (Im going to put this into output gamma curves Ive been using but then we hit problems with modern monitors doing their own gammas). However Im not sure anybody really knows what actual gamma curves those old consoles used - presumably the standards but could be power for all we (I) know at this point.

2 Likes

Sorry for the stupid late reply - Im finding it difficult to keep up with things.

So first of all thanks for doing this! I was wanting to get a spectrometer to do this. So my first question is what are you testing here - are all the settings in the shader set to neutral? Also what are you testing when using autohdr in windows 11 - are you using megatron in sdr mode and retroarch in sdr mode? Have you also tried retroarch hdr (with no shaders)?

This will be really useful to know whats hoing on. One thing I will say is that we’re trying to get to rec. 601 rec. 709 in a rec. 2020 colour space. We’re not wanting to get to full green rec. 2020 as that will make the games look wrong. This means that it is correct in this case that green is rec. 601/709 green which is slightly yellow in rec. 2020 space (and was originally too). Is this where the descrepancy lies?

Also what have you on screen at the time of the when youre capturing - the test 240p suite? If so what test?

Thanks for any info!

2 Likes

Have you got the saturation setting etc set to neutral (0.0)? This might be where your colour difference is coming from but there could well be a bug.

2 Likes

Yes definitely make sure all settings are in neutral (0.0) and vivid should be switched off as @Azurfel points out - its more like ‘dynamic’ mode on your tv and youre trying to use ‘film maker’ mode.

2 Likes

Yeah you need to modify your vertical attacks to lessen that sharp fall off which is causing the wierd slot mask artefacts BUT it is essentially because we’re using discrete pixels here and there are only 5 per half scanline at 240p using 4K resolution.

2 Likes

No problem, I’m also pretty busy and completely understand it.

To measure the colors with Windows 11 Auto HDR enabled, I set your reshade port of the shader to the neutral preset and colors / whitepoint to r709 and of course to SDR, as W11 now does the tonemapping or mapping from rec.2020 back to rec.709 if that’s the more correct term for this scenario.

When I measure your HDR tonemapping algorythm, I disable W11 AutoHDR and measure the colors with HDR enabled in the Megatron reshade menu and otherwise same settings.

I am aware, that we are trying to achieve rec. 601/709 colors in the “rec. 2020 container” which the TV uses when HDR is enabled. I just mentioned, when I measured your HDR tonemapping and W11 tonemapping, that there are differences.

And the green is even undersaturated when compared to the rec.709 triangle, which is what I used as a reference in all my measurements (the dark triangle in the screenshots is rec.709 and the white triangle the actual measurement).

Windows 11 AutoHDR is trying to keep saturated colors beyond rec. 709, which is not correct for the case we want to use it, just like you said.

The Megatron HDR tonemapping is more close to the rec.709 Gamut, but the green primary color has a slight “lime” colored tint to it, the red primary is still slightly oversaturated and the white point is heavily shifted towards magenta which gives the overall image a pinkish tint as you can see here:

To measure the colors, I simply created test patterns within Windows paint. For Red RGB 255,0,0 - for Green RGB 0,255,0 and for Blue RGB 0,0,255

These test patterns are then loaded within Retroarch image viewer with your shader applied (SDR setting when W11 AutoHDR is used and HDR setting when Megatron HDR tonemapping is used and W11 AutoHDR deactivated).

An old i1 Pro 1 spectrometer would also do the job for the beginning, if you want to buy one, as these meters are very stable over time. I have seen those on eBay for around 100 to 200 euros.

And here is the measurement, when I use just the plain HDR from Retroarch without any shader applied:

This measurement is taken with color temperature at my TV set to warm 2, which is close to 6500K. The mapping of the colors from Retroarch in HDR seems very similar to the mapping of Windows 11 AutoHDR.

1 Like

Thanks for the hint, I will give it a try.

1 Like

Thank you for the conversion to reshade. I will try it out!

1 Like

Core/emu output should be identical to original hardware output before it hits any analog circuitry in most/all cases.

3 Likes

Don’t mind me/that comment at all @MajorPainTheCactus. It seems like you misunderstood my statement. I put “when I first started out” and “initially” in italics for emphasis but I’ve now edited them and made them bold and italicized.

Sorry for the confusion but my colors are now perfect (at least for me). Feel free to look at my video and photos although they look a little different in person.

In my opinion, there are so many tools at our disposal to adjust the colours within the shader that that shouldn’t really be so much of an issue at this point.

This is what I was trying to refer to when I spoke about “Raw” and “unprocessed” output @Azurfel but I’m not as versed as you in the technical terms of this field so that’s probably why you misunderstood what I was trying to say.

3 Likes

@MajorPainTheCactus

So this gets weirder. I put full Rec 709 gamuts through lilium’s HDR analysis shader using RetroArch’s image viewer, and there does appear to be a some issue causing scattered color errors that exceed the gamut targeted by video_hdr_expand_gamut/hcrt_expand_gamut:

Primaries specifically do seem to be effected, which is most likely the reason @Dennis1 is getting gamut readings exceeding 709.

I have some theories i want to test. Firstly, i found a version of the k709_to_2020 matrix that goes to 15 decimal places, rather than 7 places like the one provided by Microsoft. I think i’ll compile RetroArch with that in place of Expanded709_to_2020. Swapping between them should give some indication as to whether this issue is the result of rounding errors or something like that.

Edit: the 15 decimal version of 709to2020 makes almost no difference (there are .01% fewer colors outside 709 using that first gamut image i linked when using 15 decimal.)

Adjusting RetroArch’s HDR Paper White or Contrast settings appears to cause the error colors to change position erratically on the analysis gamut chart, so it’s possible that one/both or something they touch is where the source of the issue lies? I will continue poking around.

2 Likes

Last night I found some time to experiment - instead of going to bed :rofl: Ok so I went back doing some side by side experiments with my PAL Sony 2730QM PVM and MiSTer (not original console) and my PC plugged into my Samsung S95B QD-OLED and having put everything to neutral and using PAL I get a pretty accurate colour match eyeballing it whereas before Ive never achieved this. With yours @Azurfel and @Cyber help its great to get to this point at least locally. Now what Im going to do is go back through me presets and reorganize and update them. Im going to update my 2730QM preset and make it the default preset and then make the default setting a saturated/vivid one. I need to continue reading the other comments here first - especially the ones about lilium HDR tests.

4 Likes

Ah Ill have a play around with this lilium reshade tests. Itll be interesting to see. If theres a problem itll most likely be in the inverse tonemapping.

I would be slightly weary here though in that we’re not wanting HDR per se ONLY its brightness levels. We essentially want to undo all the colour expansion and keep the rec.601/709 colour space so a slightly yellow green in terms of rec. 2020 green. Im not sure how any of that effects these lilium hdr tests as I havent used them but Ill be intrigued! Thanks for the link!

We can certainly put RA into SDR mode and plug reshade into it to compare apples to apples.

2 Likes