Now presenting my old school analog TV shader pack

Well after MANY hours of tweaking and finding what I think is the right look, here is the old school analog TV cgp shader pack i’ve been working on.

I don’t take credit for any of the shaders contained within, I want to thank TheMaister, Hunterk, Mudlord and anyone else I missed for not only creating them and also guiding me on the forums on how to use and manipulate them to their fullest extent. Hopefully this will serve as a good demonstration of just how powerful shaders can be when stacking and combining them! Also don’t go off just the screenshots, it really has to be seen in motion to experience it fully as the screen picture literally comes to life with just trace hints of that old interlace and brightness flicker from a TV as well as faint random noise interference to give it that warm analog look.

A few notes about the pack. They are HEAVILY dependent on Blargg’s NTSC filters to look right. Unfortunately Blargg’s filters do not play well with non-Nintendo emulators so for the Genesis/Sega CD emu for instance, it is best to turn off CPU filters and instead use the built in NTSC filters in the GenPlus GX core. I haven’t really tested these much on anything other than Nintendo, Sega and TurboGrafx 16 as well. Also using either RF, Composite, S-Video or RGB filters will give the games a radically different look as if you were using real cables, I tend to prefer composite to give it some of that old 80s smeary look but S-video looks great too!

Also, I designed the border background for 1200p resolution, I have always preferred 1200p monitors because you get more vertical height and thus a larger 4:3 ratio within which is perfect for emulators. This pack WILL work on 1080p but it slightly cuts off some of the border, however the full game screen is intact. Also remember to turn off “Lock Aspect ratio” in the video settings and just use Auto function.

This shader pack also looks great with the new libretro FFmpeg by Maister, particularly on low resolution video files, I attached a few screens of that as well. For fluid video and best picture though when playing video, please lower crt-geom-interlaced to 1x from 2x btw.

Finally a word on performance, obviously being 8 shaders stacked on top of each other, it uses a bit of horsepower to get a solid framerate. For reference though I use a Dell XPS laptop with a Geforce 555M card and I get 60FPS on my games with this, so any decent card made in the last few years should work fine with these. I don’t know how it would run on a Xbox 360 or PS3 as I don’t have modded systems but would love to hear anyone’s experience with it.

Oh and ONE more thing, all the shaders contained within have been modified and the values DO NOT match the stock shaders you will find on Github, so remember that in case you accidentally overwrite your existing shaders in your folder.

It’s been my dream to achieve a reasonably accurate CRT simulation on an LCD and I think this is a big step forward, hopefully someone with more brains and coding knowledge then I have can take what I have done and improve upon it even more :slight_smile:

Without further adieu here is the file

http://www.mediafire.com/download/p75l7c4l5ju67vh/solid12345’s_analog_tv.zip

And here are some screenshots

1 Like

looks cool. sadly i am getting a black screen though

Works here. I just played a real NES on a TV that looked similar to this, so good job :slight_smile:

@timde9 are you running it in opengl mode?

I’ve had a few issues myself with some shaders that either crash or go black myself I’m sure alot of it just has to do with certain hardware and driver configurations.

Oh god… your TV sucked it seems :smiley: mine wasn’t that round

it doesn’t work on my nvidia card with DX9 either, works on openGL though

Lol it was even worse, I originally grew up playing nintendo on a black and white tv, sorry no trinitron dark scanline goodness to be found here :slight_smile:

To get a better sense of how this looks, you should take pictures of a screen with this shader running, at a few feet distance.

First, congratulations for your work!

I’ve tried it on PS3, but it didn’t work (nothing happens, even background isn’t loaded). I don’t know what’s the problem.

This is a really great shader pack, I love it!

By default it is way too curved for my tastes though, but changing distortion to 0.2 down from 0.5 looks just about perfect to me. The only problem is that it pushes the edges out past the old TV border. What should I look for to fix this?

Also it looks like there’s a typo, pi is defined as 2.1415… I corrected this to 3.1415… but I’m not sure if it made any difference. Edit: Just looked through the file, looks like it’s only used to calculate lanczos scaling coefficients, so I think correcting it made the TV look even rounder?

Otherwise it’s really perfect. Even inspired me to hunt for an N64 emulator that supported fullscreen shaders, but there doesn’t seem to be a good solution for that (Or even any emulators that run N64 games at the proper, game-specific resolution for that matter =/ )

@deathray2k You’ll have to modify the border/background image to make it fit the new screen shape.

Re: N64, there’s a mupen64 core being worked on, but no ETA for it.

Glad you like it, I believe I changed the pi because it softened the pixels just slightly if I recall, there are alot of little tweaks in all the shaders. Like hunterk said, you’ll have to edit the border.png file but it shouldn’t be too hard for anyone with basic photoshop abilities.

Should any aspect of these shaders be used with a CRT at all?

I don’t know, it would be interesting to try, just turn off the border shader in the cgp file and set your aspect ratio to a 4:3 picture to fill up the screen. I don’t have a CRT TV anymore nor the room for one which is why I wanted to replicate the look of one as close as possible on a modern LCD.

I love this shader pack! Thanks for posting it =]

Is there any way to scale down the screen size in the shader files though? It works great on my desktop but I’d like to be able to use it on my laptop as well.

Making the TV border fit my 1366x768 screen was pretty straightforward but I can’t tell if any one thing determines the pixel size for the actual games (so I know it’s probably not that easy, ha ha).

Honestly I haven’t really tested it at lower resolutions but i’ll mess around with it sometime this week, i’m pretty busy so if anyone else here wants to improve upon or edit what I did that would be great too, community effort is the key :slight_smile:

It looks great. Can you make it for 720p? I’ve been mucking around with it but I can’t get it to work perfectly with a lower resolution…

Hello joubqa

I’m actually refining it a bit myself, I did a quick test by taking off the border shader and running the shader raw in 720p and it fits the screen but the scanlines are way too big for the pixels. What does it look like on your end?

I have no experience with this so I just spent an evening changing values until I got something like this :-p I think I prefer it without the border.

It’s full of little squares. heres a screenie:

That is similar to what I got when running it in 720p, I assume there is a value in either the scanline or CRT shader that may be able to handle the resolution/width of the scanline beam. Glad you were able to learn and poke around though, honestly that is how I created mine, just pure trial and error.

yeah this is a nice package. the bloom is a bit heavy for my taste. my personal suggestion would be the following changes in bloom-hd.cg:

static const half fWhiteCutoff = 0.9f;
BloomSettings.y = 0.3;

btw it’s pretty easy to modify it for another resolution. just scale the background image to your desired resolution with a graphic tool. then you have to modify the “out_res” value in border-centered-non-fbo.cg accordingly and modify line 42 like this:

float2 corrected_size = float2(414.0, 318.0) * (out_res.y / 1200.0) * (4.0 / box_scale);

and voila, there you go.