4k Scanline shader which allows non-integer scaling

The place for all discussion on gaming hardware
Post Reply
buddha2525
Posts: 36
Joined: Tue Jun 08, 2021 5:34 am

4k Scanline shader which allows non-integer scaling

Post by buddha2525 »

Here's something I made. It allows scanlines that appear to line up by using variable width in both the vertical and horizontal. Sort of a hybrid between a Sony BVM and NEC Chromaclear. The intent isn't to mimmick a CRT but what I think looks good on digital and also reduces motion blur when on a digital.
Spoiler
Image
Last edited by buddha2525 on Wed Mar 01, 2023 4:30 pm, edited 1 time in total.
fernan1234
Posts: 2175
Joined: Mon Aug 14, 2017 8:34 pm

Re: 4k Scanline shader which allows non-integer scaling

Post by fernan1234 »

Looks cool! Yes, not so much like a CRT but more like a low res LCD like a GBA or PSP, which can also make old graphics look good by cutting through the hard edge pixels.
buddha2525
Posts: 36
Joined: Tue Jun 08, 2021 5:34 am

Re: 4k Scanline shader which allows non-integer scaling

Post by buddha2525 »

fernan1234 wrote:Looks cool! Yes, not so much like a CRT but more like a low res LCD like a GBA or PSP, which can also make old graphics look good by cutting through the hard edge pixels.
That's what I was going for. What a projector can do by deconvergance along with gaussian blur. It looks really good on my C2 oled. There's also overlap to each edge of the pixel (sort of a feathering effect) using special bilnear filter which blends uneven scaling that greatly reduces jitter so the pixels don't wobble.

Here's a zoom in. Notice how the scanlines are very uneven? Yet there's the illusion all the lines have even "black" scanlines.
Spoiler
Image
Last edited by buddha2525 on Wed Mar 01, 2023 4:31 pm, edited 1 time in total.
buddha2525
Posts: 36
Joined: Tue Jun 08, 2021 5:34 am

Re: 4k Scanline shader which allows non-integer scaling

Post by buddha2525 »

I was playing with the settings and got it to work with 1600p native resolution of my macbook.
Spoiler
Image
Last edited by buddha2525 on Wed Mar 01, 2023 4:31 pm, edited 1 time in total.
neorichieb1971
Posts: 7667
Joined: Wed Jan 26, 2005 1:28 am
Location: Bedford, UK
Contact:

Re: 4k Scanline shader which allows non-integer scaling

Post by neorichieb1971 »

It looks kinda neat. Not sure I would like it on a big display though, but on a smaller display it could look well nice.
This industry has become 2 dimensional as it transcended into a 3D world.
buddha2525
Posts: 36
Joined: Tue Jun 08, 2021 5:34 am

Re: 4k Scanline shader which allows non-integer scaling

Post by buddha2525 »

neorichieb1971 wrote:It looks kinda neat. Not sure I would like it on a big display though, but on a smaller display it could look well nice.
Then you increase the sampling rate as the resolution increases. This is at 4k optimized for my 42" c2 OLED. I know it's a bit dark, but there's an option for tone mapping which increases brightness so it looks real good.. 42" is equivalent to a 34" 4:3. That's bigger than the biggest real NEO-GEO arcade cab at which I thinks tops out at 27" for the Japanese Candy cabs.
Spoiler
Image
Last edited by buddha2525 on Wed Mar 01, 2023 4:32 pm, edited 1 time in total.
Steven
Posts: 2870
Joined: Tue May 11, 2021 5:24 am
Location: Tokyo

Re: 4k Scanline shader which allows non-integer scaling

Post by Steven »

You'll almost never see a Neo Geo in a Neo Geo cabinet in Japan. After living here for over 10 years, I have only ever seen them in cabinets with 29 inch monitors like the (New) Astro City, Blast City, Egret II, and similar cabinets from Sega and Taito. I have not once seen an SNK cabinet in an actual arcade.

BTW I'd probably put those in spoilers tags given their sizes.
buddha2525
Posts: 36
Joined: Tue Jun 08, 2021 5:34 am

Re: 4k Scanline shader which allows non-integer scaling

Post by buddha2525 »

Steven wrote:You'll almost never see a Neo Geo in a Neo Geo cabinet in Japan. After living here for over 10 years, I have only ever seen them in cabinets with 29 inch monitors like the (New) Astro City, Blast City, Egret II, and similar cabinets from Sega and Taito. I have not once seen an SNK cabinet in an actual arcade.

BTW I'd probably put those in spoilers tags given their sizes.
Here's at 11x. This looks even better the higher you upscale.
Spoiler
Image
cfx
Posts: 842
Joined: Tue Dec 02, 2008 8:12 pm

Re: 4k Scanline shader which allows non-integer scaling

Post by cfx »

For my taste, the black horizontal lines are too prominent on that last one, where the grid is more prominent than the image, where I find it hard to see the image for what it is rather than just a mosaic of pixels. I prefer your other examples.

I guess I should add I'm not a fan of what BVMs or higher-end PVMs look like either, also with the more prominent horizontal lines, which I realize makes me have some kind of minority opinion.
Taiyaki
Posts: 1050
Joined: Fri Apr 04, 2014 11:31 pm

Re: 4k Scanline shader which allows non-integer scaling

Post by Taiyaki »

I'm in the same boat. I gave it my all on PVM/BVM's and didn't like the look. I prefer the look of consumer CRT's where the scanlines aren't overly prominent. Still this is a very nice effort.
User avatar
Konsolkongen
Posts: 2309
Joined: Fri May 16, 2008 8:28 pm
Location: Denmark

Re: 4k Scanline shader which allows non-integer scaling

Post by Konsolkongen »

For me I think it is the vertical black lines that are too exposed. I don't remember them being that noticeable on a real BVM/PVM. In your last shot I find it difficult to easily distinguish Charlie's upper body against the background, the colors look undersaturated to me.

I think the shader looks nice otherwise :)
buddha2525
Posts: 36
Joined: Tue Jun 08, 2021 5:34 am

Re: 4k Scanline shader which allows non-integer scaling

Post by buddha2525 »

Konsolkongen wrote:For me I think it is the vertical black lines that are too exposed. I don't remember them being that noticeable on a real BVM/PVM. In your last shot I find it difficult to easily distinguish Charlie's upper body against the background, the colors look undersaturated to me.

I think the shader looks nice otherwise :)
I set back the brightness and mask effect but kept the same 11x upscale. You then give up the 3d effect. I'll need to add a saturation feature. When you increase the mask effect the saturation decreases. My C2 goes past regular color gamut so I can adjust colors you can't see which are being shown on my TV. I wish I could show you how it looks on the C2 but the contrast and color volume is just too much for any camera to capture.
Spoiler
Image
buddha2525
Posts: 36
Joined: Tue Jun 08, 2021 5:34 am

Re: 4k Scanline shader which allows non-integer scaling

Post by buddha2525 »

Konsolkongen wrote:I don't remember them being that noticeable on a real BVM/PVM.
You can think of it as my Panasonic ZT60 plasma and a PVM had a baby.
Spoiler
Image
Steven
Posts: 2870
Joined: Tue May 11, 2021 5:24 am
Location: Tokyo

Re: 4k Scanline shader which allows non-integer scaling

Post by Steven »

My favourite is actually whatever the thing on my arcade monitor is.
buddha2525
Posts: 36
Joined: Tue Jun 08, 2021 5:34 am

Re: 4k Scanline shader which allows non-integer scaling

Post by buddha2525 »

Steven wrote:My favourite is actually whatever the thing on my arcade monitor is.
The problem is, how do you get one? If you do get lucky, they want a ridiculous amount for something that may die who knows when.

My favorite is the B&O MX8000. Here's what it looks like by me tweaking the shader for that particular TV. But the size goes from 33.8" to 30".

Even though this looks real nice you lose a lot of the screen.

You can't make a shader look 100% like your favorite CRT without doing integer scaling. That's what I'm trying to fix.
Spoiler
Image
User avatar
mycophobia
Posts: 751
Joined: Thu Sep 22, 2016 4:08 pm
Contact:

Re: 4k Scanline shader which allows non-integer scaling

Post by mycophobia »

gotta up the gamma on them shits brother. too dark
dojima
Posts: 47
Joined: Thu Nov 15, 2018 1:51 am

Re: 4k Scanline shader which allows non-integer scaling

Post by dojima »

Very nice work as always, buddha. You gotta release these somewhere some time.
buddha2525
Posts: 36
Joined: Tue Jun 08, 2021 5:34 am

Re: 4k Scanline shader which allows non-integer scaling

Post by buddha2525 »

mycophobia wrote:gotta up the gamma on them shits brother. too dark
They look fine on my LG OLED C2. I use HDR, tone mapping, and black level/ highlight enhancement. The tv does a better job with its AI than increasing the gamma. Otherwise during fade to black the screen still glows, while blacks crush and highlights get blown.

If someone else has a C2, I can post the settings.
buddha2525
Posts: 36
Joined: Tue Jun 08, 2021 5:34 am

Re: 4k Scanline shader which allows non-integer scaling

Post by buddha2525 »

dojima wrote:Very nice work as always, buddha. You gotta release these somewhere some time.
I'd like to, but the code is so messy and unoptimized. I need to find someone to help with that.
buddha2525
Posts: 36
Joined: Tue Jun 08, 2021 5:34 am

Re: 4k Scanline shader which allows non-integer scaling

Post by buddha2525 »

Here is more of a VGA mode ie sort of Commodore 1084s.
Spoiler
Image
buddha2525
Posts: 36
Joined: Tue Jun 08, 2021 5:34 am

Re: 4k Scanline shader which allows non-integer scaling

Post by buddha2525 »

Snes @1440p
Spoiler
Image
buddha2525
Posts: 36
Joined: Tue Jun 08, 2021 5:34 am

Re: 4k Scanline shader which allows non-integer scaling

Post by buddha2525 »

I improved the shader to work better in HDR and the tone mapping feature of a C2 @4K.
Spoiler
Image
cfx
Posts: 842
Joined: Tue Dec 02, 2008 8:12 pm

Re: 4k Scanline shader which allows non-integer scaling

Post by cfx »

Your last two remind me of a consumer Trinitron, nice look.

Disclaimer: I haven't actually seen a consumer Trinitron in many years, so my impressions might be different than reality. :lol:

Either way, those two look good to me.
buddha2525
Posts: 36
Joined: Tue Jun 08, 2021 5:34 am

Re: 4k Scanline shader which allows non-integer scaling

Post by buddha2525 »

cfx wrote:Your last two remind me of a consumer Trinitron, nice look.

Disclaimer: I haven't actually seen a consumer Trinitron in many years, so my impressions might be different than reality. :lol:

Either way, those two look good to me.
Thanks. I was going for the NEC/Mitsubishi CromaClear look.
Spoiler
Image
buddha2525
Posts: 36
Joined: Tue Jun 08, 2021 5:34 am

Re: 4k Scanline shader which allows non-integer scaling

Post by buddha2525 »

This is from the Sonkun shader. I was playing around with it in ways they probable didn't intend. But this actually looks a lot like the old arcade CRTs used in games like Yie Ar Kung Fu.
Spoiler
Image
Spoiler
Image
Post Reply