Thursday, September 13, 2012

Background Shader for RetroArch

UPDATE (9/18/2012): It turns out the Themaister already wrote a waaay better version of this shader that can do some cool things like move the location of the game window and scale to arbitrary scale factors (i.e., not just even integers). I also made another old TV background:
If you'd like to try Themaister's version of the shader--which I've provided as-is, as well as combined with flat and curved CRT shaders--you can download it and the above TV background here:
http://www.mediafire.com/?av2y788pn3v1b3e

UPDATE (9/26/2012): Another one by request, using Super Metroid's Japanese artwork:
Download:


Original Post:

I've been working on a fun little pixel shader for use with RetroArch that functions similarly to the Cg border shader but using GLSL and the XML shader format. The way it works is that it combines the functionality of the existing integer scale shader with a lookup texture (LUT) that loads an external texture and then combines that image with the rendered game image. The LUT then has a transparent window in the middle where you can see the game peeking through.

In the simplest application, you can put whatever fancy stuff you want around the game window, like this awesome pixel-art border created by FirebrandX (NOTE: all of these look better in actual use; the way I took the screenshots caused the game's vertical resolution to get cut off by the border a bit):

By using RetroArch's awesome multipass shader support, you can also tack on some fun effects, like cgwg's CRT shader and some high-resolution artwork:

We can also do fun stuff like this TV border:




And we can use the transparency of the background image to overlay things across the game, like this Super Mario Bros 2 border, which has the characters overlapping a bit:

You can download these and others here:

To use the shader, you'll need to uncheck the 'Lock Aspect Ratio' option in RetroArch, under 'Video' and put the desired background image in the same folder as the shader with filename 'background.png.' The backgrounds only work with specific monitor resolutions, so I've included 1080p versions of the ones pictured above, while FirebrandX was kind enough to make several iterations of his sweet pixel-art backgrounds that work at their specified resolutions. I've also included several background-compatible shaders, including the raw shader, ones with cgwg's CRT+NTSC-RGB (both flat and curved varieties) and some with cgwg's CRT+NTSC-RF (both flat and curved varieties).

In case you'd like to make your own, I've also included a simple template (in PSD format) for 1080p resolutions.

Saturday, September 8, 2012

Ubuntu Quantal Beta - First Impressions on x120e

I just updated to the latest beta release of Ubuntu, codenamed Quantal Quetzel (or, as I call it, Quantum Pretzel), on my Lenovo x120e netbook.

Installation went smoothly and my optional broadcom wireless chipset was detected and enabled automatically during installation. This is the first time that has loaded without any hassle on my part, and I'm very pleased with the result. Users with the default atheros chipset have been enjoying this ease of installation for several releases already.

Installation went smoothly, now that they've squashed a particularly nasty bug in the installer that would crash if you tried to manually modify the partition table...

Once I booted into the actual installed system, it defaulted to use the open source driver for my integrated Radeon Fusion chipset, which provides adequate acceleration for transparency and other desktop composition goodies. Speaking of, the default Unity interface seems to have been improved further beyond the already much-improved Precise release, with the icons in the dock being smaller and less cartoony on my machine, with transparent backgrounds rather than the garish multicolored backgrounds from before (YMMV).

Virtual desktop switching also seems much improved. I never used it before because it felt clunky and laggy, but now transitions are smooth and dragging windows among desktops is effortless and intuitive. However, sometimes the windowing system gets confused and tries to maximize things inappropriately, leaving a transparent orange overlay on the screen--to show where it's trying to maximize--until you click on the window decoration and let it do its thing, then resize.

Suspend works well on this machine, faster than before and with quicker wakeups, and the wireless reconnects faster after suspend, as well. There doesn't seem to be a hibernate option anymore, so I couldn't test that.

One problem I ran into: I previously used my /etc/fstab to mount a shared folder from my network at startup via smbfs, but that package has been removed upstream, so now I use cifs as the filesystem and that seems to work just fine.

If you have any questions or anything you'd like me to test, feel free to hit me up in the comments.