Sony Megatron Colour Video Monitor

V3.4 Sony Megatron Shader pull request has been made so it should make its way into RetroArch soon.

Added support for OLED’s RWBG layout or in other words RBG. Added support for 1080p displays although 800TVL isn’t really supported as its pretty impossible to achieve at 1080p and 1000TVL is just white as 1080p is 1000TVL (in my approximate world)

I’ve dropped support for the hidden black and white masks as well so that the shader fits into the 4096 indexable variables limit on DX11. Let me know if you use them.

2 Likes

Yes its this error:

X4505: Sum of temp registers and indexable temp registers exceeds limit of 4096

The thing is this doesnt seem to be talking about register registers as in I don’t seem to have stupidly low shader occupancy. I think its saying we’ve run out of space for ‘static data’ just in shader speak - possibly. There’s got to be some limit I suppose as the code has to fit in the tiny amount of memory in a SIMD unit - I could be wrong that its tiny as it could be stored in the L2 I suppose.

If I had used all my scalar and/or vertex registers I’d expect to see really poor performance which we don’t see - at least from my tests. I dont know…

2 Likes

Yes as it determines where the gap (the X) goes in for most of the masks. As in instead of BGRX its RBGX i.e the gap is between the green and the red instead of the red and the blue. Do try out my OLED 600TVL mask and see how it works for you.

1 Like

Just a suggestion, but instead of having the “white” mask twice for 1080p, why not move up the MG mask up to the 800 TVL slot and add a 3-pixel 360 TVL mask such as BGR or MGX (this for RGB layouts) in its place on the 600 TVL slot? Only problem is then both those masks wouldn’t match up with your current convention of 300/600/800/1000 TVL shared across 1080p, 4K and 8K. If that’s important to you, instead of that, consider replacing the 4-pixel RGBX mask with either of the 3-pixel masks I just proposed, as RGBX is not only quite coarse at 1080p, but quite dark as well, and since very few 1080p displays (even those that are HDR-capable) are bright enough to offset this loss in brightness without the techniques utilized by other CRT shaders, I think a 360 TVL mask makes more sense for this shader. What do you think?

2 Likes

It may be an improvement, but I’ve yet to see a side-by-side on par with those posted by @MajorPainTheCactus. I’d like to see some OLED shots of the same caliber, with triads that are basically indistinguishable from the real thing (if possible).

2 Likes

Greetings @MajorPainTheCactus,

Looks like you did a serious overhaul of your code but some of the changes won’t work properly for OLED TVs.

Please see my notes and comments below. I tested this and almost pulled my hair out when I didn’t see the results I expected. A quick browse of the code revealed what was going on.

New

This does not work properly on OLED TV.

// 4K 

// 300TVL
#define kMaxApertureGrilleSize       6

#define kRRGGBBX        { kRed, kRed, kGreen, kGreen, kBlue, kBlue }
#define kRRBBGGX        { kRed, kRed, kBlue, kBlue, kGreen, kGreen }
#define kBBGGRRX        { kBlue, kBlue, kGreen, kGreen, kRed, kRed }

const uint kApertureGrilleMasks4K300TVL[kBGRAxis][kMaxApertureGrilleSize] = 
{ 
   kRRGGBBX, kRRBBGGX, kBBGGRRX
};

#undef kMaxApertureGrilleSize 

#undef kRRGGBBX        
#undef kRRBBGGX       
#undef kBBGGRRX  

//I didn’t test Slot Mask but this is the correct RRBBGGX layout for OLED TV below.

// 4K

// 300 TVL
#define kMaxSlotMaskSize   7
#define kMaxSlotSizeY      6

#define kXXXX     { kBlack, kBlack, kBlack, kBlack, kBlack, kBlack, kBlack }

#define kRRGGBBX  { kRed, kRed, kGreen, kGreen, kBlue, kBlue, kBlack }
#define kRRBBGGX  { kRed, kRed, kBlue, kBlue, kGreen, kGreen, kBlack }
#define kBBGGRRX  { kBlue, kBlue, kGreen, kGreen, kRed, kRed, kBlack }

//This 8K, 600TVL RRBBGGX Mask you have here looks like the correct layout for a 4K, 300TVL OLED Mask to work properly.

// 8K 

// 300 TVL
#define kMaxApertureGrilleSize       13

#define kRRRRGGGGBBBBX  { kRed, kRed, kRed, kRed, kGreen, kGreen, kGreen, kGreen, kBlue, kBlue, kBlue, kBlue, kBlack }
#define kRRRRBBBBGGGGX  { kRed, kRed, kRed, kRed, kBlue, kBlue, kBlue, kBlue, kGreen, kGreen, kGreen, kGreen, kBlack }
#define kBBBBGGGGRRRRX  { kBlue, kBlue, kBlue, kBlue, kGreen, kGreen, kGreen, kGreen, kRed, kRed, kRed, kRed, kBlack }

const uint kApertureGrilleMasks8K300TVL[kBGRAxis][kMaxApertureGrilleSize] = 
{ 
   kRRRRGGGGBBBBX, kRRRRBBBBGGGGX, kBBBBGGGGRRRRX
};

#undef kMaxApertureGrilleSize 

#undef kRRRRGGGGBBBBX  
#undef kRRRRBBBBGGGGX  
#undef kBBBBGGGGRRRRX  

// 600 TVL
#define kMaxApertureGrilleSize       7

#define kRRGGBBX        { kRed, kRed, kGreen, kGreen, kBlue, kBlue, kBlack }
#define kRRBBGGX        { kRed, kRed, kBlue, kBlue, kGreen, kGreen, kBlack }
#define kBBGGRRX        { kBlue, kBlue, kGreen, kGreen, kRed, kRed, kBlack }

const uint kApertureGrilleMasks8K600TVL[kBGRAxis][kMaxApertureGrilleSize] = 
{ 
   kRRGGBBX, kRRBBGGX, kBBGGRRX 
};

#undef kMaxApertureGrilleSize 

#undef kRRGGBBX        
#undef kRRBBGGX       
#undef kBBGGRRX        

Old, modified by me.

This works properly on OLED TV

// APERTURE GRILLE MASKS

#define kMaxApertureGrilleSize       7

#define kMG             { kMagenta, kGreen, kBlack, kBlack, kBlack, kBlack, kBlack }
#define kGM             { kGreen, kMagenta, kBlack, kBlack, kBlack, kBlack, kBlack }

#define kBGR            { kBlue, kGreen, kRed, kBlack, kBlack, kBlack, kBlack }
#define kRGB            { kRed, kGreen, kBlue, kBlack, kBlack, kBlack, kBlack }

#define kRGBX           { kRed, kGreen, kBlue, kBlack, kBlack, kBlack, kBlack }
#define kBGRX           { kBlue, kGreen, kRed, kBlack, kBlack, kBlack, kBlack }

#define kRYCBX          { kRed, kYellow, kCyan, kBlue, kBlack, kBlack, kBlack }
#define kBCYRX          { kBlue, kCyan, kYellow, kRed, kBlack, kBlack, kBlack }

#define kRRGGBBX        { kRed, kRed, kGreen, kGreen, kBlue, kBlue, kBlack }
#define kRRBBGGX        { kRed, kRed, kBlue, kBlue, kGreen, kGreen, kBlack }

const float kApertureGrilleMaskSize[kResolutionAxis][kTVLAxis] = { { 7.0f, 4.0f, 3.0f, 2.0f }, { 7.0f, 7.0f, 5.0f, 4.0f } }; //4K: 300 TVL, 600 TVL, 800 TVL, 1000 TVL   8K: 300 TVL, 600 TVL, 800 TVL, 1000 TVL

const uint kApertureGrilleMasks[kResolutionAxis][kTVLAxis][kBGRAxis][kMaxApertureGrilleSize] = {
   { // 4K
      { kRRGGBBX, kRRBBGGX },      // 300 TVL
      { kRGBX, kBGRX },            // 600 TVL
      { kBGR, kRGB },              // 800 TVL
      { kMG, kGM }                 // 1000 TVL
   },
   { // 8K
      { kRRGGBBX, kRRBBGGX },      // 300 TVL
      { kRRGGBBX, kRRBBGGX },      // 600 TVL
      { kRYCBX, kRYCBX },          // 800 TVL
      { kRGBX, kBGRX }             // 1000 TVL
   }
};

#undef kXXXX
#undef kMG
#undef kGM
#undef kBGR
#undef kRGB
#undef kRGBX
#undef kBGRX
#undef kRYCBX
#undef kBCYRX
#undef kRRGGBBX
#undef kRRBBGGX

Thanks for this great shader! Even with the anomalies the overall output looked really impressive in HDR mode! Most likely due to what I mentioned above the RGB and BGR modes looked better than the new OLED mode in terms of overall colour, not at the “phosphor” triad level though.

1 Like

Ah I see the bug - I’ve lopped off the black as in it should be 7 elements and right now it’s 6. As youve noticed there was quite a lot of code to change to get things working. I’ll fix it up tonight, thanks @Cyber.

2 Likes

Just did a quick fix on my phone - not tested it so I’ve probably horribly broken it but it’s worth a punt with such a simple fix. I’ll test it when I get back tonight.

1 Like

I love these photos so much I’m wondering whether it’d be alright with you if I update my header post with them?

3 Likes

So I have finally tried your shader on my LG C1 and Christ……the slot mask presets you have going on with this shader are the most convincing I’ve seen ever. Is it because this shader is HDR? It really is amazing how detailed the mask is even putting my face up to the screen. No matter the tweaks I cannot get the guest shader slot masks to look like this, they look too fat/big/low res.

It’s just a shame this shader darkness my display so much even brightness turned to max - you should add bloom/glow to brighten up the colors.

2 Likes

Have you set your OLED Light setting to between 95 and 100?

Also, have you set your Power Saving to Minimum or Off?

What about your Gamma settings?

If you wanted to get adventurous you can further tweak your TV by using LG TV Companion and ColorControl.

1 Like

I’ve done everything lol. All power settings off, I even turned DTM back on because it brightens the display. I have not tried LG companion.

I was going to try guests shader as a second pass, turn off its scanlines and mask and use it to try to brighten/bloom the picture up since it really whitens whites, etc.

2 Likes

Is this too fat/big/low res?

CRT-Guest-Advanced - Slot Mask - BGR Layout

I find it a bit strange that you can’t get things bright enough when other OLED TV users seemed to have had success. I know that things like “bright enough” are highly subjective but do you mind sharing some photos of your screen also showing the “most convincing” Slot Mask so that others might better able to understand what you’re describing and experiencing?

Also, are you using the latest version of Sony Megatron Color Video Monitor? What preset/TVL/Layout are you using? Are you using the new OLED layout?

The last time I tested it, there was a bug and I haven’t tested it since?

If you feel like you want to go down the CRT-Guest-Advanced route, I have a number of presets that are optimized for OLED TVs’ unique subpixel structure in my shader preset pack which you can use as a guide or starting point.

1 Like

The thing I’d say about that photo is that there are a lot of pixels on that should be off as in should be pitch black and that’s what a lot of people (including myself which is kind of why I did my own shader) see as fat/blurry etc phosphors. It gives a funny look to the image that you dont see on an actual CRT. Having said that its easy to turn them off in the Guest shader - isn’t it something like 100% mask opacity? But then you get back to the issue that its all too dark again in SDR/low brightness TV’s and around we go.

@trnzaddict I’m pretty sure your TV should get bright enough - are you using HDR at all? As in, in Windows HDR is enabled and in RA HDR is enabled and you’re using the HDR presets?

1 Like

Not directly but HDR (because of its brightness) allows us to have 100% black masks i.e properly turn pixels off and its this that gives the convincing masks. Basically you need bright OLEDs/LCDs to mimic CRT’s (which are very bright for the split second the scan beam head excites the phosphor). Your TV should be capable of this brightness from what I can gather from others.

1 Like

I will take pics tonight. Something clearly is not right with the my settings then because the way you’re making it sound is getting the slot mask to look just like Megatron’s should easily be plausible in Guest or your presets. I tried your ultimate slot mask presets and they do NOT look anything like the pics you’ve shown in your thread.

Major’s slot mask is the only mask I’ve seen on my C1 that look exactly like my Sanyo Vizzon CRT in my game room. But it could be my settings again are wrong with other shaders. I don’t nearly have the same amount of time to tweak settings as I used to.

Also yes - compared to the brightness I get from Guest Megatron is dark in comparison - too dark for it not to bother me and that’s without BFI either. The colors are lifeless.

2 Likes

This is strange but you can post some pics as well as general descriptions in my thread concerning this since I won’t want to stray too much off topic.

All of the pics I’ve posted look fine on my TVs as well as on my phone when I’m viewing the forum. Someone even posted some videos on YouTube using my presets and the colours seem pretty decent. I’m not doing anything exotic with white balance or anything like that in my presets.

Do remember that there is “Ultimate Virtual Slot Mask CRT-1PT2RTA” as well as new “IV OLED” TV versions. All of the “IV OLED” TV Presets have mask settings that would fit properly on my 2016 OLED TV.

Even @nfp0 uses similar mask settings on their OLED TVs.

Photos might definitely give some insight as to what’s happening. I might also post my TV settings when I get a chance.

1 Like

If the colours are lifeless this does sound like you’re using the HDR preset with a non HDR setup i.e it’s not enabled in Windows or something. It might be the other way round also: SDR preset used with a HDR setup.

1 Like

Greetings @MajorPainTheCactus, I hate to be the bearer of bad news but something seems amiss in the new OLED Mask Layout.

I noticed it when I tried the 8K, 600TVL Mask before you made your adjustments but I thought I’d wait until you updated and tested before saying anything.

So I tested the 4K, 300TVL using the Sony PVM 1910 HDR preset and these are my results.

Another CRT Shader in RRBBGGX mode

Old modified version of Sony Megatron Color Video Monitor in RRBBGGX mode:

Unfortunately I don’t have access to the old version of Sony Megatron Color Video Monitor to retest old version with my modifications. That one seemed to work as it should though.

Is it possible for me to get a copy of it somehow in order to retest with my modified RRBBGGX settings?

Okay, so I reverted the parameters.h, crt-sony-megatron-source-pass.slang and crt-sony-megatron.slang from the source and this is what I’m getting:

It looked the same when I applied my modified RRBBGGX settings.

This is a mystery because, I’m 100% certain of my results from 9 days ago and even @Wilch’s modified Shader pics showed the twin blue, green and red columns. Also it’s not far fetched to think that this is something achievable because it has already been achieved in CRT-Guest-Advance. We shouldn’t have to reinvent the wheel just to get the same thing happening in Sony Megatron Color Video Monitor.

Now I’m wishing I had backed up my shaders before updating but it could be something else at play here.

I’m going to try some other presets and see if that makes a difference although it shouldn’t.

In the meantime @Wilch, do you mind retaking that same photo using the new Sony Megatron Color Video Monitor OLED Layout? Be sure to backup your shader folder before updating.

2 Likes

This what I’m talking about….this is the most correctly looking slot mask preset I’ve ever seen on my oled.

I cannot get any other shader to display a slot mask like this.

This is guests slot mask, I cannot get it looking right at all. Slot mask width, height etc. does not change the mask at all.

2 Likes