New CRT shader from Guest + CRT Guest Advanced updates

Thanks for taking the time to respond. I was just trying to wrap my head around these statements made by @Nesguy and wondering if we needed something different or special in order to achieve this type of result. I was under the impression that we did but I’m glad to know that it can already be accomplished using the currently available options at our disposal. Slot Mask is something I have on my to-do list, that’s part of the reason for my interest in this specifically.

1 Like

Yeah, @Nesguy is very fond of authentic mask reproduction and has realistic views about resolution and display brightness needed for this. Good news is that ‘GDV’ also improved in this regard by new (de)convergence and mask fall-off implementation. I’m currently not pursuing ‘realistic’ full strength mask presets i can’t test or recommend with my HDR 400 display though.

3 Likes

Totally understood and appreciated. I’m also not looking to recreate a specific TV or display. I see my CRT shader presets as representing my own unique line of virtual CRT Displays. I’m very excited when my “CyberLab TVs” do things to our beloved pixelated gems that I find visually pleasing or desirable. Real displays mostly serve as inspiration or guides for my purposes.

Be sure to check out my latest Composite - Pure preset running some NES Games with and without Blargg NTSC RGB Filter or my Composite - Sharp preset running some colourful SNES gems like UN Squadron!

I’ve only tested my 4K Optimized versions since my update yesterday though and I’m probably a couple versions behind in the GDV department, only because I wanted to finish what I had started before updating my HSM Mega Bezel Reflection Shader. On my 4K Presets, I’m using Full Strength Mask and Scanline Type 2 (which really enhances contrast). I’m getting ample brightness without the requirement for HDR!

It’s a nice treat to be able to go close to the screen and see the image being composed of those RGB “phosphor” triads as might have taken place during childhood.

I mainly test and play with these things on a 55" 4K TV from at least 6 feet away. I can just imagine how detailed and refined they might look on a smaller 4K screen!

3 Likes

Get an ipad screen @Cyber :joy: jkjk

1 Like

The problem with MajorPainInTheCactus’ mask is just that it’s super-dark. It’s a very straightforward mask representation (just draw the phosphors 3x3 and surround with black) and it looks great if you can push enough brightness, but there’s no way for a non-HDR display/pipeline to brighten it up enough to be usable just with the tricks at our disposal.

6 Likes

Could we use a dark grey and fudge things? I mean I personally don’t care, but we fudge stuff with magenta and green already, so meh lol

Sure, just use a lower mask strength. That turns the black into gray.

1 Like

Lololol, that’s not what I meant but fair enough, wasn’t asking for code btw.

EDIT: To clarify, I was asking if it’d be a good trade-off to turn the black into grey via code to compensate for brightness loss, or would we have to turn the black to too light of grey to actually help with the brightness loss, which would render the “black” moot in the mask?

Tldr; Would turning the black part of the mask grey via code be a good trade-off for brightness loss, or would the change cause more bad then good?

lol no worries, I wasn’t being glib. You can lighten just the black pixels but that ends up looking goofy in my experience because you end up with the crossbars being lighter than the actual pixels sometimes (depending on how dark your gray is). The reason we do the magenta/green thing isn’t so much to lighten it up but to use the subpixel behavior to suggest higher res than we really have, while the rgbx mask is relying on us having high enough resolution to not need any of that (think text: if you use a large enough font, you don’t need the subpixel hinting to make out details and can just draw them normally).

While rgbx is sufficient for a low-TVL aperture grille at 1080p, the staggered slotmask version makes for a very chunky image at that res and is only appropriately sized at 4K+ res. So, MajorPainInTheCactus’ shaders are using HDR to avoid compromising–or using complex compensation/workarounds–for brightness and using high resolution to avoid compromising in mask design.

If we had super-high-res and super-high-brightness displays all along, we never would have had to come up with any of these tricks, just draw the CRT mask the way it looks (or use royale’s photos) and we’re off to the races.

8 Likes

I have been discussing some issues with @TheNamec (shadowmasks…) and got a proper inspiration which resulted a nice mask shift implementation. Works more or less with all masks, although some shift values give much better results. The good about the feature is that it works very nice with increased mask size too…

New Release Version (2022-02-10-r1):

Notable changes:

  • deconvergence reworked, works as intended now (== much better) (general release info)
  • mask shift/stagger option added (works as intended) (general release info)
  • trinitron lut(2) improvement
  • color temperature improvement
  • alternate (negative value) bloom bug fix and small improvement

Download link:

https://mega.nz/file/1xoQyYBL#Tq9X6J9Fup8cEYxqIuHWtKh04nfD6TMuiCf20b_b2AQ

15 Likes

Ohhh thank you @guest.r this tech boost really comes at the right time and takes care of many critical spots of my own Mega Bezel project, can you publish some before/after comparison? I’m just too curious and will not be able to reach my workstation before a couple of days…

The quest to compensate visual clarity and brightness with shadow masks on different levels of distance from the simulated monitor was really draining, I’m eager to test the new configuration :exploding_head: :partying_face:

3 Likes

The setup is quite simple, but there are some features regarding mask width.

With mask width of 2 one pixel shift works, suitable for 1080p, otherwise the pattern is very fine.

With mask width of 4 two pixels are to be shifted, pattern suits 1080p and 1440p displays very well (fullscreen).

With mask width of 3, mask size is to be ‘doubled’, 3 pixels shifted, looks very nice with 4k.

Other patterns can be used too, i guess some crt displays had some sort of staggering with their masks.

In general more resolution is better here.

Here are some compare shots with mask 10 (RGB-Black):

standard:

shifted:

mask stagger, mask 0:

8 Likes

Really nice, mask stagger bumps that brightness boost my Ikegami dot-mask preset was starving for! Time to get back at the experimentation table for some 1080p sustainable solution.

4 Likes

Thanks! Mask 2 with stagger 1 improves 400p/480p for DOS games a bit.

Previously I was using mask 3 for VGA/SVGA games. But with the stagger setting, mask 2 and stagger 1 gets rid of the slight screen-door effect. It was very minor and mostly only visible in white areas, but an improvement like this is always welcome.

Before (mask 3, stagger 0):

After (mask 2, stagger 1):

4 Likes

Beautiful update guest, just beautiful. I love seeing this shader grow and advance more.

5 Likes

Quick question on the average luminance, would it be possible to have a roll-off function implemented that lowers brightness gradually when total average screen brightness increases?

The idea is that with the HDR options when you raise max luminance and paper brightness than individual pixel details really start to pop. However with HDR brightness at top when a full white screen appears your eyes get burned, which makes it rather impossible to raise HDR brightness to the max in the current setting.

A roll-off function could be at 0 == normal (current) behaviour. I.e. a white pixel at max strength is always at 255,255,255. This is whether there is 1 single individual pixel on a total black screen, or whether the whole screen is filled with white pixels at 255,255,255.

For roll-off values higher than 0 than the more pixels are lit (the higher the avg input screen luminance) the more the average luminance at shader output is lowered. I.e. with roll-off at max setting than a fully white screen would be (for example) at 232,232,232 for all the pixels.

This would allow us to really blast the Retroarch HDR Max Luminance and Paper White to it’s MAX, without burning our eyes on fully white screens, while still having the benefit of super bright (CRT like) individual pixels in screens that are like the 8-bit games (lots of black in games, but sometimes start screens are fully white etc.)

So with the roll-off parameter and setting RA HDR to MAX, we could lower the “artificial” brightboost bright and brightboost dark in the shader (currently at 1.40 and 1.10) to maybe their unity values and get more genuine color display compared to real CRT because the brightboost is coming from the screen hardware like a real CRT, and not from artificially boosting the values in the shader. The roll-off function for that is needed because with current shader full white screens really burn into your eyes with HDR at max nits.

Not sure if I get my point across, but it’s sort of blending the concept of the PVM shader with the guest advanced shader with an adaption.

2 Likes

Yeah, that’s not this hard to implement, since average screen brightness is already available. With my testings you might want to use a bit more reduction though.

The control parameter is available on the end of the list. Currently only works with the standard preset.

Download link:

DL Link.

2 Likes

Thanks! That works quite good already.

There are some instances though where it’s not there yet I think.

I’m noticing that for very bright I want to set the parameter to about 220 (like you said). Works very well for very bright screens.

However at this setting it also lowers the brightness on screens with a lot lower average brightness / a lot of black, like below screen.

(if you make two presets, one with the LDB, and switch between them you see how this image is affected in brightness).

International Karate (Endurance Games)

Of course there are a lot of games from the 8-bit era that have largely black and then some sprites ect. So this is just an example of a screen that would preferably not be darkened when Dynamic Brightness is active.

Is there a way we could tweak at what average luminance of the screen the darkening kicks in? It would be lovely if that could be a user parameter such that it can be tweaked a little to find at what average luminance level will do the trick.

In the end the goal is to lower the bright boost dark and bright boost bright from the shader to preferably unity and compensate the loss of brightness by maxing out HDR max luminance and paper white. But for this to work the “Lower Dynamic Brightness” should only work / kick in for very bright (high average luminance) screens, such that our eyes don’t blasted when a high average luminance screen / white screen is shown.

Edit: maybe this is a case where we just want to “cap” the average luminance of the screen to the parameter value. Is that possible, is the average lum function able to sort of ballpark good enough calculate the average luminance of the screen?

2 Likes

You might be right about the average luminosity calculations. They were a bit optimized for the raster bloom effect. I’ll be doing an overhaul of the functionality, so the effect progression is a bit different.

Otherwise, the concept of calculating average luminance is working as intended, at least with some drivers (glcore, vulkan).

3 Likes

Great. With some of the testing I did it seems possible to lower both Bright Boost Dark and Bright by quite a margin and substituting it with a highly raised HDR Peak Luminance and Paper White. Then the HDR Contrast setting could be used to balance (raise) the black level. Of course the drawback currently being that fully lit / white screens really burn your eyes.

If that could be tweaked it looks really promising for a “HDR Preset” of your existing Advanced preset as only the bright boost parameters are lowered and an instruction is needed for users to adapt by the HDR settings in Retroarch for an even better experience.

Ah, that could be a thing as I’m using D3D11 for HDR. For some reason Vulkan and HDR won’t work for me.

1 Like