New CRT shader from Guest + CRT Guest Advanced updates

The shader received a decent redesign, so it could be related with some conceptual changes. It might be also related with the coordinate shift in conjunction with the mip-mapping issue, multiplying the coordinates with 1.0001 etc. Driver discrepancy is not excluded. I checked and compared the versions again with a lo-res test image and didn’t notice any border crush effect.

Edit: ah, i found a test case which confirms the ‘issue’. Will take a look. :slightly_smiling_face:

Edit3: most contributing is the delayed use of the corner function to the deconvergence pass. Corner was my first suspect though…fixed now.

3 Likes

Is it possible to have the “Lift Black Values” go in reverse? I often find myself wanting to give a little more contrast to the very darks that get blurred out from bloom, halations, and glows. For example, on Mario’s eyes in Super Mario World.

Thanks, I can confirm all shaders are similar now. :+1:

2 Likes

It would lead to strange effects and these games/situations can be managed with different functionalities. Bloom/brightboost is to be used instead of glow/halation (they work differently, without the ‘aura’ effect). With filtering pixel contrast can be achieved with substractive sharpness or smart edge interpolation. I implemented bloom this way because of these situations.

Alright. Now seem like a good time for me to step in for the first time.

I’ve also been trying to improve contrast. I’ve been finding, however, that hue might also be affected. This is frequently apparent on skin tones, although not always.

I find cranking up input and output gamma all the way 5.0 to an effective solution. This, unfortunately, amplifies glow/halation/bloom to a point that just not beautiful at all.

I find Panorama Cotton to be a good game for experimenting with this.

Aside from that, most other games don’t have a problem in my eyes. I’ve been meaning to create an account for a while now, just to thank you and shower you with praise.

Edit: Boom/brightboost actually seem to washout colors and yellow skin tones the most. I couldn’t find a good place to mention that above. Glow wahses out the least.

New Release Version (24.01.2021-r1):

Notable changes:

  • “Fastest” version added. Needs testing, feedback is welcome! Up to 2.5x faster than regular version.
  • some small, but important bug fixes.

Download link:

https://mega.nz/file/sgJDGAqK#XkCVXxvix59-k7M9U7xGaceCWC_mQernhwI9X18bnyY

I did my best with the extra fast version. It works ok with my 2 adapters, maybe it will work faster with your’s too.

8 Likes

@guest.r I knew you would make some witchcraft and deliver! It runs way better but barely scratches the surface at 56fps (even with threaded mode on)…Honestly thanks again for taking the time to do this!

1 Like

1440p fullscreen, 300fps vs 700fps with fastest here. (around 500fps for “fast”)
(i5-3570k GTX770 quicknes smb, custom shader parameters)
:rocket:

2 Likes

New Release Version (24.01.2021-r2.1):

Notable changes:

  • Fastest version now even faster!

Download link:

https://mega.nz/file/lpA2lDDb#wZmG88sNJJTYIuDgk7G7Gc5v3-fgPCj9DoNsrjbPEjY

You should try it now…might be even faster.

Many thanks for testing! :laughing:

Edit: Fixed integer scaling, corner.

7 Likes

@guest.r, on Super Mario Bros. (NES), Level 2, I noticed that the “raster bloom” effect is excessive. It seems that the effect is now more sensitive. You can test it?

What Scanline Type do you recommend (0, 1, 2)?

“Raise Black Level” is typed wrong: “Raise Balack Level”.

Your shader can bring the look of the TV that I used as a child to play video games. Amazing! Thank you!

1 Like

Yeah, the “Raster Bloom Effect Smoothing” parameter was lowered for better response. It’s configurable in general.

Huh, with me this depends from my mood. But it somewhat depends from the mask and filtering setup also.

Uh…a typo, it’s fixed now. :slightly_smiling_face: Thanks for noticing.

New Release Version (25.01.2021-r1):

Notable changes:

  • While already usable, some remaining issues are fixed with the ‘fastest’ version now.
  • A typo corrected

Download link:

https://mega.nz/file/YgpkVZgZ#i0ToX4ahREIA-V_E4alyDS-YESoJy6hZkeumJW-6nXU

6 Likes

@guest.r Yes, that did it! I really admire the effort you are putting into this, not only making a great shader to begin with even greater, but making it more accessible! :slight_smile:

1 Like

On the matter of typos is “Bright Boost bright” suposed to have a lower case “b” compared to “Bright Boost Dark”?

Originally I was going to ask why the brightness settings seem to affect hue; after runing an image through both RetroArch and GIMP and fiddling with some settings, however, I think I understand the issue a bit more.

The brightness settings don’t seem to make the image more “bright”. Rather they seem to make the image more “light”, by GIMP’s terminology, at least.

Is this a solvable issue? If not, I think I’ll be sticking with the default mask strength.

Edit: Note: The reason I used the wording “a solvable issue” is because of the very real possibility that I may be an idiot here.

Hi @guest.r

Been trying to tweak the glow and halation and found some interesting PVM example measurements that I like to replicate. Unfortunately with the current settings I cannot replicate them so I need your help :slight_smile:

On this page: https://www.displaymate.com/ShootOut_Part_1.htm there are contrast measurements for a PVM20L5 full-screen white/black and checkerboard 4x4 and 9x9:

  • Peak luminance (calibrated for no white saturation) is 176 cd/m2
  • Black level for full black screen 0,01 cd/m2
  • Dynamic Range 17.600
  • 4x4 checkerboard: contrast falls by a factor 80 to 215
  • 9x9 checkerboard: contrast falls another factor 3 to 75

For 4x4 and 9x9 the midpoint of the black squares is measured.

“4x4 checkerboard values with Dynamic Range above, we see that the CRT value has fallen the most, by a factor of 80 because of heavy reflections within its thick glass faceplate.”

It’s interesting that for 4x4 the midpoint of black squares is (implicitly) measured at 0.82cd/m2 and for 9x9 at 2.42 cd/m2 (176/215=0.82 and 176/75=2.42). Quite a bit higher than the 0.01cd/m2 with full black screen!

So I tried to achieve this look with your GDV2 glow/halation feature but unfortunately whatever I do the midpoint stays fully black (looking with color picker on shader screenshot).

I attached my mocked up 4x4 and 9x9 testimages below (both 320x240p). Maybe you could give them a spin with your shader and see if these measurements could be replicated?

Thanks again for the work you’re doing on this digital CRT preservation project :slight_smile:

Checkerboard-4x4-320x240 Checkerboard-9x9-320x240

1 Like

It’s achievable with some simple settings, although i think raising the black level or adding some noise should do it. Anyway, you should use only glow for this purpose, as i mentioned, gdv bloom and halation follow differen’t goals. Another question is, how you want to play your games, so the default settings are quite neutral.

Just to clarify, the screenie is about distribution of glow, intensity is easily regulated. I think you could reproduce it quite easily.

5 Likes

What is the value to be as it was before?

For mask 1 and 3.

1 Like

First it was 0.90, then for a short time 0.80. I think 0.70 is more authentic and older GLSL implementations in GDV were also more jumpy.

Try starting with type 2. Although type 0 allows nice presets with games that use more colors.

1 Like

Thanks for the answer, I’ll only use glow.

The issue is that I’d like to replicate the case mentioned, with the relative brightness of the black square midpoint in 4x4 relative to 9x9 (which is about factor 2 to 3 higher)

The measured luminances were:

  • black screen 0,01 cd/m2
  • 4x4 checkerboard black square midpoint: 0.82 cd/m2
  • 9x9 checkerboard black square midpoint: 2.42 cd/m2

So if I do a color picker on the shader output for the 4x4 and 9x9 I would want to find a ratio of 1:3 in their respective black square midpoint, using RGB level as a proxy for luminance. Or if we would convert to gamma space a ratio of 1:2 would probably be more suitable.

However with current glow parameters at their max (30.0 and 15.0), otherwise you’ll not reach the midpoint in 4x4, the ratio is 1:5 or 1:6. Meaning the glow near white is too bright relative to the midpoint.

FOR EXAMPLE at desired shader setting for 4x4 midpoint color picker shows 8,8,8 , but then when I load 9x9 the midpoint is 50,50,50. So it always seems a factor of 1:5 to 1:6, whereas I would like a ratio of 1:2 or 1:3, to replicate the PVM19L5 measurements. Meaning for my example case the 9x9 balck square midpoint shoud be 2 to three time the 4x4 value so something between 16,16,16 and 24,24,24.

Is there anything that can be done to get the ratio for the 4x4 versus 9x9 midpoint lowered according to the above to a ratio if 1:2 to 1:3?

Edit: below I cut and pasted both relevant parts into one image.

Edit 2: maybe I should test with enlarged max values for radius and sigma? But I’d rather check with you first.

2 Likes

You can increase both gamma values for more distant distribution of the bright glow, it’s quite safe to crank it up to 3.0, even more with 32 bit precision. In general this sort of contrast requires wide processing, which comes with performance cost, not to mention conflicting with other effects, even as a simple black point increase. On the bright side glow, black level, noise all decrease contrast. If performance allows it you can tweak the parameter ranges and also use a larger sigma. This + higher gamma should do for this specific case. :smiley:

Edit: will probably add a flat contrast decrease option in new version.

2 Likes

I’d rather not increase gamma, as it also increases how much (individual) bright pixel “grow” over dark pixel and I like it a bit reduced.

I’l try the parameter range increase as performance with my setup isn’t an issue right now :slight_smile:

This sounds interesting, not sure though if it fits my objective?

For me I’m after the glow effect as for a full black screen I don’t want any increase in black level (just like the test case: for full black screen, black luminance at 0.01 cd/m2 is practically zero.)

Only for increasing white/black checkerboard patterns the internal light reflections in the CRT glass lower contrast in the checkerboards, inceasingly so with increasing checkerboard NxN pattern.

Edit: which seems a purely glow related decrease in contrast as something bright must be nearby to create the internal reflections in the CRT glass.

1 Like