New CRT shader from Guest + CRT Guest Advanced updates

Cheers, it’s not bad, but I find the noise a bit too much personally. What I’ve done in literally 2 minutes is:

  • create new layer in PS, fill with 128 gray
  • Filter -> Add Noise -> Gaussian / 4% / Monochromatic
  • Blend 40%, Overlay blend mode

That’s it, I find the effect quite nice. Should be dead easy to do in a ReShade shader (no, the WinUAE shaders don’t have built-in noise functionality). The PS blend modes are documented here, it doesn’t seem too heavy calculation wise, it just screws around with the sRGB pixels like half of the PS blend modes… I might even implement myself if I don’t find something that does it already.

(Target > 0.5) * (1 - (1-2*(Target-0.5)) * (1-Blend)) + (Target <= 0.5) * ((2*Target) * Blend)

https://www.deepskycolors.com/archivo/2010/04/21/formulas-for-Photoshop-blending-modes.html

1 Like

Lo and behold, good things come to those who can use Google :sunglasses:

Overlay formula

A texture based Gaussian noise sampler

Now it only takes some hackery :toolbox: :hammer_and_wrench: :zap: :biohazard: :bomb:

I’m pretty sure Guest’s version simply just adds the noise, hence the raised black floor. So maybe overlay blend mode could be made an option (I used overlay blend mode a lot when dodging/burning photos… if the overlay layer is “centered” around a 128 grey then it maintains the luminance in plain old RGB mode even).

I asked @HyperspaceMadness for an Overlay blend mode in the Mega Bezel way back when and he ran into a roadblock. (I’m not sure where.)

If you could make it work maybe it would solve some masking issues I’m having with the HDR shaders.

I’ve mentioned this several times before, and this is from experience and testing.

You can’t illustrate GDV noise using screenshots or any freeze frame, including pausing the emulator due to its temporal nature. The image wouldn’t look anything like it does when the game/emulation is running.

You might instead have to use video clips with the proper encoding settings so as to be able to preserve the fine details of the noise or maybe a photograph of the screen that has the appropriate shutter settings in order to capture all phases of the noise.

Any other way will be presenting an image that is most likely missing data that will be displayed in subsequent frames or were displayed in previous frames.

For some strange reason I’m not noticing this raised black floor at all in any of my presets, of which the majority use a tiny amount of GDV Noise.

Perhaps I’m doing something “wrong” ?

I was just showing the black level issue. Not the noise itself.

2 Likes

the black level (and/or general color quality) is why I prefer the noise to happen in the texture coordinate instead of just adding/multiplying/whatever random values per pixel. This kind of noise more closely mimics the movement/“sparkle” I see in the scanlines of my own CRTs. I think doing luma-only noise (simulated film grain) usually looks better than RGB noise, too, unless you’re trying to imitate actual static/interference.

See the noise I added to crtglow to help with the moire as an example of the texcoord-type noise (enable curvature and then set both x/y values to 0.0 and the noise to 0.5-0.75; the default 1.0 is too heavy for a flat image IMO)

2 Likes

Yeah I think it would be relatively straightforward to apply the noise like that with a middle gray, and have everything under middle applied as darkening and everything above adding white

2 Likes

I really meant illustrating anything involving GDV Noise. The image in the screenshot or paused emulator wouldn’t really be representative of what the user would see, including black levels.

Hello, a few days ago I switched to glsl from slang. Now I stumbled upon the gdv-mini shader. Is the concept behind that shader to be even faster than the gdv-fast preset?

2 Likes

I’m not sure if that was the original concept or just a side effect but you can probably ask @DariusG as he’s the person behind it.

1 Like

Yeah it’s a lot faster, I tweaked it so it works fast enough on some weak devices I had around, without dropping much features (curvature, masks, etc).

3 Likes

Alright. Thanks for the modification/sshader/preset :slight_smile: love it.

3 Likes

New Release Version (2022-05-07-r1):

Notable changes:

  • contrast option added
  • alternate “negative” bloom changed
  • noise is now correctly removed outside the screen with curvature enabled
  • new ‘luma’ multiplicative noise option added

Download link:

https://mega.nz/file/VoQyna4b#GCyjh5xHWeehCzDGqA-MbQ8yJYO4C1lQmqQCsGiYYvw

10 Likes

That alternate bloom and luma noise option looks interesting, gonna look into both of those and see what I can come up with. I already see the alternate bloom gives colors an extra punch and a little more brightness, I like what the luma noise does as well but I see you can’t use too much of it or it’ll be overwhelming. This should be fun to play with

3 Likes

New Release Version (2022-05-13-r1):

Notable changes:

  • ringing option added to be used with substractive sharpness, sharpness ‘feel’ can be very increased
  • ntsc-fast blend mode 1.0 greatly improved, preset also changed
  • edit: small sharpness tweak

Download link:

https://mega.nz/file/cgQHHYLY#EXZ_muEnJG0nhSGtbDQ5jawU7yylXn9MyYJpM84ATv4

13 Likes

As always , thanks for all of your work guest. I been thinking if it would be possible to increase the sharpness without reverting back to the pixelated state on edges , curtsy of r/CRTgaming

a shot of BVM

perhaps because I’m using 4k 65 inch tv so pixel density isn’t om side

Also In the image , mask has no tint effect on colors. From what I can see the colors are almost 1:1 with no shader . I have a sony x950g which according to Rtings has BGR subpixel layout.

image

But enabling the BGR in the shader mask parameters would actually tint the colors more.

2 Likes

You can adjust the “Scanline spike removal” parameter for the scanline edge effect which you wanna have.

I would suggest mask 6.0 where you can decrease the main mask strength value for a pure scanline look. The saturated borders of the scanlines can be achieved with the “scanline saturation” parameter.

For this looks is also important that you play with other scanline shape parameters a bit.

Parameter settings:

gamma_c = "1.200000"
gsl = "2.000000"
scanline2 = "20.000000"
beam_min = "1.999999"
beam_max = "0.950000"
beam_size = "0.250000"
scans = "1.999999"
scan_falloff = "0.500000"
spike = "0.300000"
s_sharp = "0.400000"
shadowMask = "6.000000"
maskstr = "0.100000"
mcut = "1.200000"
mask_layout = "1.000000"
post_br = "1.100000"
3 Likes

Thanks ,will give it a try later.

1 Like

If your screen is BGR you have to use the default RGB Mask layout 0. If it’s RGB you have to use Layout 1.

Switch between the two and see which one looks better. If you use the wrong Mask Layout there will be severe colour tint issues.

If you want those kinds of edges be sure you’re not using any type of upsampling (prescaling) as well. Use 100% prescale (sampling resolution multiplier).

@guest.r, would Mask 13 (RRGGBBX) be a good alternative to Mask 6 (RGB) in this case as @saeedalshaikhpygas is using a 4K screen?

1 Like

BVM displays have a rather high TVL rating, so likely mask 10 would still fit. Masks 11 and 12 have a single mask strength control, so it would take some experience with bloom to wash the mask out on brighter pixels.

1 Like