Sony Megatron Colour Video Monitor

Oh wow this looks fantastic - great work @cyber. So what can I do to help integrate? In fact do you need me to do anything?

1 Like

I started a lot of the colour stuff based on the Grade implementation but then over time slowly ditched stuff as it didnt quite work with the way I had done stuff. However most of the end result is there already.

1 Like

Where do I find this preset? Do I just download your cyberlab pack?

1 Like

Glad to see you excited about your stuff again!

Well it’s really my shortcoming that I don’t fully understand how to or know when to use what scale settings in order to combine certain shaders so I was just going to spend the time to finally try to learn but I think what might be useful to help users create some beautiful presets are maybe a few more generic base presets which include a few very powerful and effective Shaders pre-integrated.

The first of which is the one that @GPDP1 helped us with already. That’s a direct upgrade and drop-in replacement for the example you included which uses the old NTSC Adaptive Shader which happens to be broken.

He didn’t include the Filtering Section, which might have come in handy in some instances but I don’t think it’s absolutely necessary at this point. What he did is a great start.

The next thing would be to integrate the new Super-XBR from Hyllian in a generic Base Preset. So just the Megatron and Super-XBR would make for some really awesome RGB-esque presets or even cleaner than RGB without some of the low res harshness which can be seen on some consoles.

Last but not least a generic base preset that combines Super-XBR, the new Guest enhanced NTSC-adaptive that @GPDP1 isolated and good old Sony Megatron Color Video Monitor.

Instead of 3 separate base presets you could have 1 or 2 with toggles to disable Super-XBR or the NTSC Section.

Not sure what the defaults are but it would be nice to have a decent starting point for the two luminance values.

For My TV in HDR Game Mode, I’m having success with Peak Luminance of 630 nits and either 720, 830 and 900 for Paperwhite. So maybe 600 and 700 or 700, 700 might be good at least for LG OLED TV users. I’m still experimenting though.

I guess we can take it one step at a time. Cover the low hanging fruit first, give users time to get more familiar and fine tune stuff as best as they can, then from there see what can be improved.

Other than these things mentioned here, I mentioned some other stuff in a previous recent post that I’d like to see implemented, which are some working Dot and Slot masks for my display type.

Don’t forget the quick workaround for the Vulkan HDR bug. I just added a # to the offending line in the Shader.

Oh, I’m still working on my Sony Megatron Color Video Monitor preset pack. I should have something releasable probably before the weekend is over.

I really want to try to integrate the Super-XBR shader before releasing but I can do that after. It might be hard for me to go back to using non HDR Shaders at least on an HDR display.

I can PM you a preliminary version of my preset pack if you’re eager to start to do some stuff right away though.

Finally I’m not sure how possible or feasible this might be but I really enjoyed using the Mask - Triad Size Desired feature in CRT-Royale. I know it’s mask implementation might be different due to the use of LUTs but the scalability is remarkable. Sometimes when the TVL is too low, they leave all sorts of untidy artifacts at the edges of objects. I was able to almost fully eliminate stuff like that, while achieving my desired low TVL looks.

While with Sony Megatron Color Video Monitor and CRT-Guest-CRT-Advanced the TVL might be adjustable only in larger steps.

CRT-Guest-Advanced recently got a Mask Width feature but I’m not sure if it’s similar to what I saw with CRT-Royale because I haven’t tried it yet.

Currently I use the NTSC Resolution Scale to achieve a similar effect but as you go down in resolution things can get soft and blurry.

So this is a sort of wishlist for Sony Megatron Color Video Monitor.

Thanks for making this possible!

Another nice Shader to add would be the Sharp Smoother Shader.

I ignored Grade but the new Grade has some really nice features, for example the Sega Genesis/Mega Drive colour palette!

It also includes the Sega Brightness Fix.

One more thing, would it be okay if I distributed my modified version of the crt-sony-megatron.slangp file in which I commented out the scale_type2 = viewport line or should I wait until there’s an official fix to deal with that issue?

1 Like

I actually ported the phosphors/color systems that you didn’t already have included from the current version of Dogway’s grading shader for my own use if you want to include them:

NTSC-J P22

  • const mat3 kNTSCJ_to_XYZ = mat3(
  • 0.458432f, 0.309549f, 0.182474f,
  • 0.256722f, 0.668848f, 0.074430f,
  • 0.018337f, 0.127136f, 0.943584f);

P22 (80’s)

  • const mat3 kP2280_to_XYZ = mat3(
  • 0.460844f, 0.307613f, 0.181910f,
  • 0.244311f, 0.676311f, 0.079378f,
  • 0.007123f, 0.106901f, 0.975034f);

P22 (90’s/tinted phosphors)

  • const mat3 kP2290_to_XYZ = mat3(
  • 0.404151f, 0.354887f, 0.191418f,
  • 0.201984f, 0.714530f, 0.083485f,
  • 0.000607f, 0.062960f, 1.025491f);

RPTV (late 90’s/early 00’s)

  • const mat3 kRPTV00_to_XYZ = mat3(
  • 0.331718f, 0.429476f, 0.189261f,
  • 0.173634f, 0.738044f, 0.088322f,
  • 0.012958f, 0.091941f, 0.984159f);

Generated using https://www.russellcottrell.com/photo/matrixCalculator.htm with the reference white set to D65 so they would play nice with either your color temperature adjustment system or just changing the color temperature on the display (which is my personal preference).

2 Likes

Welp, I managed to get it working after all:

shaders = "9"
shader0 = "shaders_slang/crt/shaders/guest/advanced/stock.slang"
filter_linear0 = "false"
wrap_mode0 = "clamp_to_border"
mipmap_input0 = "false"
alias0 = "PrePass0"
float_framebuffer0 = "false"
srgb_framebuffer0 = "false"
scale_type_x0 = "source"
scale_x0 = "1.000000"
scale_type_y0 = "source"
scale_y0 = "1.000000"
shader1 = "shaders_slang/crt/shaders/guest/advanced/ntsc/ntsc-pass1.slang"
filter_linear1 = "false"
wrap_mode1 = "clamp_to_border"
mipmap_input1 = "false"
alias1 = "NPass1"
float_framebuffer1 = "true"
srgb_framebuffer1 = "false"
scale_type_x1 = "source"
scale_x1 = "4.000000"
scale_type_y1 = "source"
scale_y1 = "1.000000"
shader2 = "shaders_slang/crt/shaders/guest/advanced/ntsc/ntsc-pass2.slang"
filter_linear2 = "true"
wrap_mode2 = "clamp_to_border"
mipmap_input2 = "false"
alias2 = ""
float_framebuffer2 = "true"
srgb_framebuffer2 = "false"
scale_type_x2 = "source"
scale_x2 = "0.500000"
scale_type_y2 = "source"
scale_y2 = "1.000000"
shader3 = "shaders_slang/crt/shaders/guest/advanced/ntsc/ntsc-pass3.slang"
filter_linear3 = "true"
wrap_mode3 = "clamp_to_border"
mipmap_input3 = "false"
alias3 = ""
float_framebuffer3 = "false"
srgb_framebuffer3 = "false"
scale_type_x3 = "source"
scale_x3 = "1.000000"
scale_type_y3 = "source"
scale_y3 = "1.000000"
shader4 = "shaders_slang/crt/shaders/guest/advanced/custom-fast-sharpen.slang"
filter_linear4 = "true"
wrap_mode4 = "clamp_to_border"
mipmap_input4 = "false"
alias4 = "NtscPass"
float_framebuffer4 = "false"
srgb_framebuffer4 = "false"
scale_type_x4 = "source"
scale_x4 = "1.000000"
scale_type_y4 = "source"
scale_y4 = "1.000000"
shader5 = "shaders_slang/crt/shaders/guest/advanced/stock.slang"
filter_linear5 = "true"
wrap_mode5 = "clamp_to_border"
mipmap_input5 = "true"
alias5 = "PrePass"
float_framebuffer5 = "false"
srgb_framebuffer5 = "false"
scale_type_x5 = "source"
scale_x5 = "1.000000"
scale_type_y5 = "source"
scale_y5 = "1.000000"
shader6 = "shaders_slang/crt/shaders/guest/advanced/stock.slang"
filter_linear6 = "true"
wrap_mode6 = "clamp_to_border"
mipmap_input6 = "true"
alias6 = "AvgLumPass"
float_framebuffer6 = "false"
srgb_framebuffer6 = "false"
scale_type_x6 = "source"
scale_x6 = "1.000000"
scale_type_y6 = "source"
scale_y6 = "1.000000"
shader7 = "shaders_slang/crt/shaders/guest/advanced/stock.slang"
filter_linear7 = "true"
wrap_mode7 = "clamp_to_border"
mipmap_input7 = "false"
alias7 = "LinearizePass"
float_framebuffer7 = "true"
srgb_framebuffer7 = "false"
scale_type_x7 = "source"
scale_x7 = "1.000000"
scale_type_y7 = "source"
scale_y7 = "1.000000"
shader8 = "shaders_slang/crt/shaders/guest/advanced/crt-guest-advanced-ntsc-pass1.slang"
filter_linear8 = "true"
wrap_mode8 = "clamp_to_border"
mipmap_input8 = "false"
alias8 = "Pass1"
float_framebuffer8 = "true"
srgb_framebuffer8 = "false"
scale_type_x8 = "viewport"
scale_x8 = "1.000000"
scale_type_y8 = "source"
scale_y8 = "1.000000"

I ended up having to replace all the in-between passes with stock passes. I’m guessing it’s probably possible to do it more cleanly without all those stock passes, but as far as I can tell, this works. Here’s a shot of this preset combined with Megatron’s PVM 20L4 preset on my humble 1080p monitor set to max brightness:

2 Likes

Also, just a thought, but would it be outside of the scope of this shader to incorporate the “base mask” feature that GDV uses to simulate the parts of the mask not being hit by the electron beam being ever-so-slightly visible? It’s something that occurs on every CRT as far as I can tell, and it’s unobtrusive. Sure, it does lower contrast somewhat, but CRTs never had perfect contrast to begin with.

2 Likes

Great stuff thanks for the detailed list - its really good to understand what people want or are finding problematic. I need to add two things to the list: fix the shader so that it works (by removing the scaling viewport line in the .slangp) and rotation of the scanlines and mask for those that cant tate mode their monitors.

So the problem with good paper white and peak luminance is that 200 and 1000 works perfectly for the S95B that I have. HDR displays vary wildly in this respect it seems.

What is Super XBR and what does it do by the way.

1 Like

Super-XBR is an enhancement shader that removes some aliasing at the edges of sprites and graphics but in a very subtle manner that attempts to preserve the original pixel artists intention as much as possible.

It can actually help make things look nicer for example when the TVL is too low for the phosphor triads to fit properly within the boundaries of a font for example, the excess gives an unpleasant ladder effect and chromatic aberration.

It’s very subtle and it scales inversely with resolution so for higher res consoles like Turbo Duo, Sega Genesis, PSX and many 90’s arcade systems it’s a set it and forget it, while on the lower resolution systems like SNES it works well on games that use lots of blending, sharing and melding in their graphics for example Super Metroid, Contra III and Hagane but it doesn’t look so well in games that use more cartoony line art graphics like most 2D Mario Games. Those look best without XBR.

For me all NES games look better without it.

For most 16-bit era and 90’s arcade games it’s an ideal companion.

I’m basing this on the default settings by the way. It is fully adjustable.

This is how it looks when I use it.

These screenshots also demonstrate the Dot Mask Pattern that I’d like to be able to make using Sony Megatron Color Video Monitor and they use all of the Shaders (via Mega Bezel) that I asked you to integrate and combine if possible in my previous post.

It really bridges the gap between certain Turbo Duo games and SNES games. While Turbo Duo was capable of higher resolution and more simultaneous onscreen colours, it’s palette was limited compared to SNES and many games just looked a tad rougher around the edges on Turbo Duo compared to on SNES.

I’m not completely sure as to why though. Someone did a comparison of the excellent PC-Engine port of Street Fighter II Champion Edition Vs the Sega Genesis port and the SNES port and the SNES port seemed to have a higher colour count than the other 2.

I’m really having a lot of fun with this shader!

These pictures are a bit far off from how things look in real life.

@guest.r Those blue horizontal lines are not visible in real life. The waterfall looks perfectly translucent in practice and I can look up and down without the said lines appearing.

Edit: maybe if I had set my camera speed to 1/30 instead of 1/60 I might have gotten a proper capture.

This is true. Is this 200 and 1000 using you’re display’s “HDR Game mode” equivalent setting or the brightest HDR setting because if I’m using “HDR Bright” I could get away with much lower Paperwhite settings?

Maybe a note or hint can be included with a suggested starting point for LG OLED users which is more in line with what you’ve seen reported here by users of those displays.

2 Likes

how’s this? https://github.com/libretro/slang-shaders/commit/eca36c3b049e5351c6c4ba9c2d82d4d45a896066

2 Likes

Yes ok I saw these in grade shader and wasnt sure at the time what they were referring to. I see that they are the primaries of the actual phosphors used which couldnt exactly match the standards primaries. Ill add these in as it should he easy to do.

1 Like

I think you can achieve that by upping the gamma cutoff to the cutoff that the standard defined. I think I documented at the top. This should give you non black blacks which is what you might be after?

1 Like

Oh perfect! Thanks @hunterk youre an absolute star. Ive been meaning to do this but every spare moment Im pouring into my other project and I needed to get my head back into git submission from where I left it off ages ago. I do need to find time to add a few features requested above. Thanks again very much appreciated!!!

3 Likes

Ah right xBR is a stylistic shader as in it doesnt simulate something that happens in an original hardware setup - its trying to give us something new. Thats great its interesting to see new stuff. I do like the original xBR shader look - reminds me a bit Windwaker and that cell shading look (but in 2d obviously) Ill have to give it a spin! Very ingenious to put this in the pre phase - looks great.

Yeah the TV is HDR game mode. Maybe what I need to do is separate out those two options and state you must change these? Still nobody really goes into the shader options as they ping pong about in the shader directory.

1 Like

This looks great! Its really getting that old TV look. Im going to have to give this a whirl too. I just need to shove all the above in front of that 20L4 preset and it should work?

1 Like

You might as well add the NTSC-FCC 1953 Standard Phosphor as well if that is workable:

0.67 0.33 0.21 0.71 0.14 0.08 (xR yR xG yG xB yB)

or

  • const mat3 k1953_to_XYZ = mat3(
  • 0.588010f, 0.179133f, 0.183224f,
  • 0.289661f, 0.605640f, 0.104699f,
  • 0.000000f, 0.068241f, 1.020817f);

since that is the only other major (color) CRT phosphor set/color system that will be missing after you add the others.

They were only definitively used in some early/1950s color TVs, but they may have also been used for at least some Brazilian/PAL-M and SECAM displays? (This sort of thing is way out in the weeds. The original standards for both PAL-M and SECAM specified the same primaries as NTSC 1953, but that doesn’t mean they actually used the phosphors given that most if not all manufacturers of actual NTSC TVs were ignoring the standard and using different, brighter but narrower gamut phosphors by the the late 1950s.)

2 Likes

I don’t know how much clearer you need to be than you already have been. Maybe put it right up on the top?

This is all pioneering stuff so users might just need to take the time to get used to doing things a different way.

The ones who really care would.

I wouldn’t necessarily say it’s trying to give us something new. I think it’s tries to recreate the “natural” antialising and blending of the edges that occurs on a real CRT. When pushed, it can produce false positives and posterization type artifacts.

I’d say that it helps give a nice finishing touch and can actually match and even exceed the aesthetic quality of sprites and other graphics compared to real hardware on a CRT, especially when they are blown up on a large screen TV, while preserving the original retro style of the graphics if used sparingly.

It doesn’t have to look cel shaded at all. It can work more like upscaler for 2D graphics.

I’m really glad to see that you don’t mind implementing it!

1 Like

Yes, as far as I could tell there were no issues by simply doing that. Load the preset, then load whichever Megatron preset you want after, and it’ll work. Again, though, I’m wondering if there’s a way to get rid of those excess Stock passes? I tried deleting them, but it seems to fail if they’re not there. I assume it’s because the last pass is expecting some passes before it with a specific alias in the preset, which is what I did if you’ll notice (the shaders are Stock, but the aliases are exactly the same as they were in guest’s original preset).

2 Likes

First off, just to get it out of the way: the version of your decoupling with crt-guest-advanced-ntsc-pass1.slang included blows out/massively overbrightens the image in HDR on my system. Changing float_framebuffer8 to false (or changing srgb_framebuffer8 to true) appears to fix this at a glance, but i suppose there may be unintended consequences?

That said:

crt-guest-advanced-ntsc-pass1.slang calls LinearizePass, the previous shader in the chain (alias7 in your decoupling) in three places.

If those calls are replaced with NtscPass (alias4/custom-fast-sharpen.slang in your decoupling) the resulting preset loads, but doing that would obviously break crt-guest-advanced-ntsc.

Either continuing to use stocks for the dummy alias or adding a “crt-guest-advanced-ntsc-pass1a.slang” with those alias calls changed seem like the best solutions? What would you suggest hunterk?

The preset seems to load without issue with the stocks you have at shader5 and shader6 removed outright.

(ntsc-pass3.slang calls PrePass0/alias0 a couple times as well, but that is explicitly pulling a pre ntsc-pass1.slang version of the frame, so i think that just needs to be left alone barring more extensive changes to the shader scripting.)

2 Likes

Whoops, accidentally posted that as a reply to the thread rather than to you specifically.

1 Like