A new little shader i did (glsl)

Looks like the X-axis needs warped slightly more, but it looks pretty close.

And if you can figure out how to get the corners pinched in slightly more, you’ll be basically there imo.

2 Likes

Yeah that’s easy to do.

2 Likes

I’ve been messing with curvature a lot lately so I’m being super​:microscope:with it :joy:

2 Likes

Look at you being a wizard and getting them values!

2 Likes

Fixed a small mistake in the curvature code, check again the screenshots and changed the code too.

1 Like

I was in the middle of looking at the screenshots as they changed, and immediately checked the code :joy:

1 Like

If you add some things like 480i handling etc it pretty much does what crt-geom does. There is a chance i add them and if it’s faster than crt-geom-mini in the end i could replace the code with this. All code i upload are experiments that end up here and there in some shaders lol

2 Likes

Actual CRT dots, this TV has a bit of convergence too but in general the actual dot shape is close to lanczos. Notice how the shape shrinks vertically in left side due to scanline being much more prominent (vignette).

2 Likes

Indeed, Lanczos is a good sharp approximation.

But, for me those dots are a bit assymetric. Vertically they’re symmetric and looks like gaussian. Horizontally they’re assymetric and are more like some Rayleigh distribution or similar.

2 Likes

I believe that’s convergence issue, red has jumped to the right, green up and right, blue to the left. Gaussian is similar too but in small amounts not like in e.g. lottes that’s huge, never seen a TV that looks that blurry, to say the truth maybe in some old computers with junk modulators like Atari ST using RF.

This screenshot is using an RGB cable.

P.S. there is a nice utility in linux called magnus that zooms anywhere on screen

2 Likes

Did some extra work on crt-sines glow, now it works properly as it should. Crt-consumer shares the same code for glow. It uses 5 passes horiz. and 5 passes vertically, totally 10, hacking and using linear to produce an effect that would need 81 passes in a single shader or 18 in 2 split shaders. Not bad :stuck_out_tongue:

3 Likes

Looks great!

For the asymmetry, could that be the beam having a shorter rise and a longer fall?

2 Likes

More work on ntsc-simple glsl, added some different modes for different systems, every one should create its own artifacts (pce, MD, SNES, c64, zx spectrum etc, searched dot clocks, cycles per pixel blah blah, so it should be somewhat accurate) and a small NTSC shader in glsl, tiny_NTSC that does SNES and MD properly, passing nes-snes ntsc tests, rainbows etc. If there is any interest I’ll port them to slang later when I settle with settings.

This runs on a 2013 HTC one, that’s GLES 2.0 only (tiny_ntsc)

3 Likes

@DariusG looking very good. I checked your ntsc-mini yesterday and just say lots of thanks to make it possible!

Is there a reason why you make it for GLSL but not for vulkan? I’d be happy from here if you can do that import to Slang, please!

Also is NTSC mini intended only for Sega Genesis games with the classic Rainbow or can also work as intended for NES games e.g ?

Thanks again.

1 Like

I write it first for GLSL as it runs everywhere (and i have some old phones around that run only GLES) and then if there is demand i port it to slang. Ntsc-mini works as intended for NES/SNES but as i learn and read about ntsc and think various solutions to write it as fast as possible it’s not entirely accurate, i believe ntsc-simple (and tiny_ntsc) is more accurate right now. The problem is there is no any documentation how to write an accurate ntsc shader anywhere so you have to figure it out yourself. Plus one thing: Every system creates it’s own artifacts depending on pixel clock, cycles per pixel, alternating lines, animating artifacts etc!

But even in the current state, it marginally passes the nes/snes ntsc tests.

While ntsc-simple is more accurate, as i have more knowledge now how it is done

and tiny_ntsc

2 Likes

Fixed some things on GLSL ntsc-mini (rainbows and snes dot crawl), check this after PR is accepted

5 Likes

Thank you. What is PR ?

It means Public Request, to add code on Retroarch github code base.

Do you have a source to get your most updated NTSC mini and the other one you mentioned recently ?.. tiny ntsc if remember correctly.

I dont find anymore a way in retroarch to update GLSL shaders as used to do a couple of years ago, but just Slang ones.

Thanks again

The one I’ve been checking thus far says to be updated from Febrary 2024.

I will update slang when settle everything. That’s 3 shaders, ntsc_mini, ntsc_simple and tiny_ntsc.

2 Likes