Friday, March 4, 2016

New and Updated Shaders

It's been awhile since I've done any shader posts, so I figured I'd cover some updates that have happened recently. Same format as usual, the only difference this time around is that instead of zooming into screenshots using photoshop, I made them straight from RetroArch using the 'zoom' from my image adjustment shader. This gives sharper, cleaner detail shots. Anyway...

No Shaders (Nearest Neighbor)

Here is a shot with no shaders for comparison.


ScaleFx

Sp00ky Fox had been working on cleaning up artifacts from the Scalenx shaders and, in the process, worked up a similar algorithm of his own, known as ScaleFx. By cranking it up to 9x, he managed to do some pretty impressive smoothing:

Some notable things here: check out the circle-c copyright symbol, which is very hard to deal with in this sort of shader, as well as the straight lines throughout the logo and on the shallow slope below the dragon coin.

He also made a variant, known as scalefx-hybrid-9x, that uses reverse-antialiasing and creates some interesting depth and shading effects:

It does introduce some haloing, though, and is pretty heavy, performance-wise.

xBR-lv2-accuracy-multipass

For the past year or so, Hyllian has been working to improve his now-famous xBR upscaling algorithm, mostly by pairing it with other algorithms and working to improve handling of problematic edge-cases. Very recently, though, he changed the way corners are detected and added a new color diff algorithm, which fixes some weird artifacts that could occur when bright red and bright blue pixels were next to each other (artifacts not pictured):

Here is an older version of the same shader for comparison:

Again, the copyright symbol is a good example of the improvements, along with the circles inside the number 9s. The updated version also works quite well with Playstation-era antialiased images, while ScaleFx works best on bold, cartoony graphics, like Super Mario World and Shantae.

CRT-Lottes Updated

Since we first ported Timothy Lottes' scaling pixel art shadertoy, he did a couple of iterations to add bloom and a few more variations on his awesome shadow mask code. r5 incorporated those updates into our port and threw in some runtime parameters (including the aforementioned mask variations):

This is the default compressed TV-style shadow mask^^.

This is the Trinitron-style aperture grille^^.

This is the stretched VGA-style shadow mask that was used in the original shader^^.

And this is another VGA-style mask with larger phosphors^^.

CRT-Royale-Kurozumi Preset

Shmups user Kurozumi posted some really nice settings for TroggleMonkey's CRT-Royale shader that makes it look very much like a high-res broadcast monitor (e.g., Sony's BVM line or the 800-line PVMs):

I put these settings into a cgp preset, located in the 'cgp' subdirectory of the main common-shaders repo.

8 comments:

Dillon Morris said...

Could you please tell me how the hell I can convert or get working the ScaleFX shader for DOSBox?
I have been trying for DAYS and I'm so frustrated.
I think I need to convert the cg shaders to fx for SVN Daum, but I have no idea where to start.

Dillon Morris said...

or is there another way I can play Daggerfall with the scaleFX shader?

Hunter K. said...

Hi Dillon,
If you have experience working with shader code, it should be pretty manageable to port over to SVN Daum's fx format. Otherwise, you could try playing it through RetroArch's dosbox-libretro core, though that core is known to be temperamental.

Dillon Morris said...

Thanks for replying!
I have no idea how I would do that could you give me some advice? Or a place to start maybe?
I love the new shader Spooky made and I think it would be a great fit for Daggerfall,
I also tried the DOSBox version in Retroarch but it crashes everytime I try to load DAGGER.EXE.
Thanks again

Ryan Bram said...

Hi, Hunter K.
Thanks for creating this blog.

Do you have any idea how to use those CG Shaders for real image processing outside emulator? Maybe a commandline program like:
Convert.exe input.png -shader xbrlv2.cg -out output.png

If you know a software like that. it will be very nice a there are many nice CG filter in libretro repository.

Best Regards,
Ryan

Anonymous said...

Hi ! I love those posts :) On Raspberry, crt-pi is getting more and more momentum and I think it looks great (try with and without the SHARPER option). Could you include it in your comparison ? It works on super slow GPUs at a constant 60 fps.

Anonymous said...

Hello ! What kind of GPU is necessary to achieve full speed with the ScaleFX shader, for instance ? Are the fastest Intel Iris OK for this task ? That's what the new gen NUC have, which is a piece of hardware many of us use or plan to use for emulation puroposes :)

Hunter K. said...

@Anon1
Yeah, good idea. I'll try to cover it next time around.

@Anon2
I don't have access to any Iris hardware to test but my guess is that it will be okay. Don't go buying something just based on my hunch, though :P

Analytics Tracking Footer