NTSC + CRT preset/shader

Hello, I’m wondering about all these fantastic shaders, most of them only care for the screen mask, which I find superb, but still lack that CRT feeling from signal artifacts like RF or composite and that many seem to overlook. I would find it ideal to compose 2 or 3 different shader types, screen type only, and signal type only, and then be able to mix them on an array of combinations, like:

[b]Signal Shaders /b: RF Composite S-Video Scart Component …

Screen Mask Shaders: CRT (masks; aperture, phosphor, etc) LCD Plasma …

Effects Shaders: TV Geom (Corner, edge blurring, etc) Bloom Gamma Contrast …

Wouldn’t that be more organised or easier? Well, it’s only my opinion being a novice on the matter myself. I like the ntsc filters, but probably not as much as the crt-halation ones, those also include an option to mimic non-flat TV’s, and unlike the ntsc shaders work with other cores (mednafen psx, etc). The problem is that it lacks the signal aspect of the ntsc ones, I tried layering them without success. I read about it on this thread, hunterk even linked some multipass shaders but they are in .shader format now deprecated in RetroArch. Have someone managed to mix crt and ntsc shaders without issues?

##############

I’m also having issues loading motionblur-simple, I want it to use in conjunction with dot.cg. lcd-shader.cgp is fine but on full screen the cells are misplaced, even when integer_scaling is set to true. What do you guys use for GBA? I never had one so I don’t know which is more similar to the real thing. Same with GBC though.

Thanks for help

It’s possible to layer cgwg’s CRT, for example, on top of maister’s NTSC shader via cgp files. It’s usually just a matter of adjusting the scale factors for the passes to make it look right.

I’m not sure why motionblur-simple doesn’t work for everyone, as it’s a very simple shader. You can try changing the driver to d3d instead of opengl and see if that helps. I usually use dot.cg on its own for GBA, personally, though it’s not really attempting to recreate the real thing.

it seems to be an issue with the support of ORIG and PREVX. dogway already reported an issue with mdapt which we could narrow down in my thread to the mentioned feature. at least I’m pretty sure that’s the cause.

I tried with cgwg shader but it’s clearly not as good as the halation, it lacks bloom, it’s too dark and curvature is not as good, I get moire everywhere, this is the best I could manage:

ntsc-256-gauss-scanline (current choice)

crt-halation

ntsc+crt-cgwg

edit: I also have a question why is it called NTSC, aren’t signals region independent? and what signal is it trying to mimic, composite probably? is there any RF shader in cg format?

As for the GBA shader I was using the LCD shader preset, because I liked very much the ghosting effect built in, but I can’t seem to use any motion shader alone to use apart with random filters, I get similar behavior of what I described on the dithering thread.

Tested on TV (where I’m really supposed to play or willing to), outcome is a bit different than expected.

Background: Having an HDReady TV (1366x768) the highest resolution I could set my TV to was 1280x720, so there was unavoidably going to happen a resize on screen from 720p to 768p. To view full desktop (due to overscan) my resolution was ultimately set to 1202x676, meaning that the on-screen resize would turn to be from 676p to 768p. Not only 676p is a weird resolution (problematic probably with pixel based retro games) but resizing is bigger than from 720p to 768p, which means loss of detail/accuracy. I tried to circumvent that resizing the screen directly form retroarch with:

video_fullscreen = "true"
video_windowed_fullscreen = "false"
video_fullscreen_x = "1280"
video_fullscreen_y = "720"

Well, to my surprise, that gave me tons of problems, scanlines were almost non existant, or weren’t even gapped depending on shader. Some had vertical chroma stripes, etc. When loaded crt-halation it gave me cracky sound… Deleted the above and almost all problems faded away… :confused:

I then tested with integer on/off, what happened is that when on vertical scanlines seemed to go off, not at all but more than when off, which makes the screen maximize on TV. So everything the opposite I had thought about.

I really like crt-halation, and tried to layer it on top of ntsc-256.cgp without any change. I checked also some other shaders, crt-geom-flat and cgwg (practically the same, geom-flat slightly darker only) and hyllian, much much darker. I found all of them too dark, then tested with crt-geom-flat-sharpness and it was bright, just my taste, but in the other hand very simple, no vertical scanlines nor chroma phosphors… just like the NTSC shader presets. At last tested scanlines.cg and it was nice, but faint CRT effect thoughand no chroma phosphors. So to sum it up, the current options for mixing good signal with (not as good) crt shaders are:

Signal: ntsc-320px (Composite?) ntsc-320px-svideo ntsc-256px (Composite?) ntsc-256px-svideo

CRT (lack bloom, distortion, etc): crt-geom-flat (dark and moire; see cgwg above) crt-geom-flat-sharpness (no phosphor, no vert scanlines) crt-hyllian (updated: no curve or bloom but good otherwise) scanline (no chroma phoshors)

Mmmm it can be tricky to combine several layers of shaders. I can’t tell you which settings you need to put exactly but there is an evident issue with your cgwg based test (3rd picture). The magenta/green subpixels are too wide like they are zoomed in. You should be able to mimic the same curvature you have with crt-halation, less moire and better clarity (but without halation). Try to use crt-geom-flat (that’s the most up to date one) and edit it with a text editor to put the settings you like from crt-halation.

Then it’s up to the scaling and order you use for both shaders… It’s tricky and I didn’t understand much about it last time I tried.

Yes I know, the interesting part is that yesterday while writting my observations above I was testing the cgwg shader and got totally different results, the crt mask was now clearly visible but couldn’t get the curvature (and hence moire) shown above. I was only getting the curvature on the top border. I know that crt-halation uses a curvature function different than the rest of the shaders, that’s why now I can’t make it use in any other shader (eg. crt-geom-flat). Let me post my yesterday test with cgwg:

edit: as a note yesterday while playing with friends, and using crt-halation (alone) loaded Tony Hawk 2 and sound went crackly, is this normal? I suppose this is because the game resolution, but it is also true that it is a pain to get up, plug the keyboard (HTPC here) and change the shader. There aren’t alternatives to load different shaders to specific games either.

Kept testing and actually the only system I can use crt-interlaced-halation with is the FBA core. With Sega CD (and probably all those loaded with Genesis Plus GX) I get some vertical chroma stripes, on SNES sound and video have many hiccups, and on PSX has issues have problems as stated above, tested all these on integer_scale, on 1280x1024 monitor and HDReady TV. I always use VSync too.

I would appreciate also if someone can help me get the geometry right on crt-geom-flat.

An update:

The crt-interlaced-halation vertical stripes thing seems to be a bug. It was working fine on snes, but only for the 4:3 aspect ratio. On 8:7 (1:1 par) as I said it was running slow, wh knows why. Its halation is subpar too, so I think we still should wait for a decent curved shader with dotmask and bloom.


This thread originated an interesting debate on the byuu’s forums. They discuss how to merge NTSC modulation effects with crt-hyllian shader, starting this post.

Here a

(http://board.byuu.org/viewtopic.php?p=106172#p106172) from “byuu” himself:

[quote]I understand the logic and idealism behind having CRT simulation and NTSC simulation treated as entirely separate, but I think given the realities of our display DPI rates that an optimal solution on current displays will be to come up with a single pass that takes the desired characteristics of each individually and combines them. I can see a situation where they are still separate passes, but they need to be aware of each other and not just treated as entirely separate from each other.

Really, when it comes to the SNES at least, I don’t see any desirability of NTSC simulation outside of the color bleed necessary for these hires effects, which should be an easy thing to do alongside a CRT simulation. NES is of course a very different story.

I differ though. As we have already seen how the NTSC signal changes color too.

In any case on that thread some suggestions were mentioned, mainly for the hires-blend effect except the first one which includes NTSC effect, I list them here:

NTSC gauss (hires-blend and composite effect) GTU MADAPT (de-dither effect) snes-hires-blend

Now I’m gonna test these with crt-hyllian, my default shader for flat scanlines, and post here.

For me, the NTSC color change downgrades the image too much. I hate when red turns into orange…

There are 2 things, emulation (purism), and configuration (tastes), we need to accomplish the first one to start playing with the second to suit our likes. Some people find scanlines themselves a downgrade so we can’t really argue about it. I’m testing with the above filters, but there’s not a single one I can make work. I think the madapt needs a recent RA build, is it? I’m still testing.

I completely disagree with this. It’s not because something was shit before that I have to keep it forever. What guides me in making shaders is the possibility to get rid of all things I considered shit in my childhood playing time. Just my opinion.

Scanlines serve to one purpose: they give the illusion of a hires image without distortions (your brain is let to think you are watching hdtv behind a grid). It’s something that naked filters didn’t accomplish (yet). Someday they won’t be necessary.

And some people consider scanlines shit, and hence use no filters or opt for xbr interpolation. Scanlines were not supposed to be viewed at all (they vibrated) so they have a point there.

What I meant, and you seem to overlook, is that to go beyond emulation, you first need to emulate. You don’t skip steps, you use a real example to base on, and then tweak from there. There always should be purist approaches regarding shaders, experimentation can go later since that is more prone to not be of common taste and generally causes many other issues. So if you read that thread you should have read about CRT using gauss, I consider ringing not only artificial but more shit than the inherent blur CRT had. It’s a bit childish to go to a thread titled “NTSC shader” to say NTSC is shit, grow a pair man.

[/quote] Your’re overreacting unnecessarily. As I said, my opinion is just that: my opinion. You don’t have to agree.

And, I don’t need to emulate to achieve the look I want. Why limit yourself?

But ok, you have a point: I shouldn’t express my opinion in this thread as this serves no purpose. I apologize for that.

I am trying to bring to fruition a NTSC+CRT preset shader to this thread I opened 2 months ago, and all you have to say is: “For me, the NTSC color change downgrades the image too much. I hate when red turns into orange…

Great contribution there, from the crt-hyllian shader mastermind, I expected more TBH.

Anyways, on-topic, managed to merge ntsc-256px-svideo-gauss-scanline with hyllian, here is the process: raw…crt-hyllian

ntsc…ntsc+crt-hyllian

gtu…gtu+internal-scanlines…gtu+internal scanlines+hyllian’s dotmask (best but doesn’t work with external shaders) (might be slow and render chroma wrong)

snes-hires…snes-hires+crt-hyllian (4x res) (on 8:7 ratio) (noticeable shift to green)

mdapt.hires…mdapt.hires+crt-hyllian (4x res) (smooths too much?)

Download link for the three presets here.

Also tried to add bloom on top of them but got garbage graphics, I tested with hunterk method (gaussian-vert, gaussian-horiz and combine):

I’ve already acknowledged (and apologized) my mistake in posting something unrelated to this thread. Though my opinions stand as is. No need for this overreaction.

Only in interlaced content, which was very rare in retro consoles (it was fairly common in PSX menus, and a few gameplay scenarios, like Tekken 3 and R.P.M. Racing on SNES). I’ve heard people claim the lines rolled down the screen, as well, which apparently comes from a misunderstanding from seeing an electron gun firing in slow-motion.

In non-interlaced/double-strike/“240p” mode, the blank lines are quite visible and stationary with a good display and high-quality connection. They are the reason the consoles can put out 60 fps in the NTSC standard, which is, by definition, 30 fps interlaced.

In fact, the term “scanline” refers to a line that is actually drawn, rather than the blank space in between them, though we associate the term with the blank lines because that’s what gets added when you apply a scanline filter :slight_smile:

Re: cgwg’s halation shader, if you use this cgp, it should function exactly like his old XML version (i.e., without the striping, which is caused by rendering at 3x and then upscaling with quilez; it’s faster that way but can cause problems)

shaders = "3"
shader0 = crt-interlaced-halation-pass0.cg
filter_linear0 = "true"
float_framebuffer0 = "false"
scale_type_x0 = "source"
scale_x0 = "1.000000"
scale_type_y0 = "source"
scale_y0 = "1.000000"
shader1 = crt-interlaced-halation-pass1.cg
filter_linear1 = "true"
float_framebuffer1 = "false"
scale_type_x1 = "source"
scale_x1 = "1.000000"
scale_type_y1 = "source"
scale_y1 = "1.000000"
shader2 = crt-interlaced-halation-pass2.cg
filter_linear2 = "true"
float_framebuffer2 = "false"
scale_type = "source"

There’s still some moire, but that’s just a reality of putting curved scanlines on a flat-grid LCD monitor.

Thanks for help. It’s been ages since I played on a CRT. I asked once and didn’t get a response so assumed there was vibration no matter content.

I still don’t quite get all this 240p. You feed 60 “fields”/frames of the game per second, and in between there are also (fed) 60 black frames that are “deinterlaced” along the game “fields”, and hence producing “scanlines” (because the game “fields” have always the same order (TFF or BFF) scanlines are stationary). So every second a CRT “asks” for 120 fields, is that so? Then I understand I think. I guess I can even reproduce this on Avisynth.

Thanks for the halation help, I will test on TV when I got time, since I bought a new card I guess speed shouldn’t be an issue now.

I have a few question regarding new builds though. There’s an option called Soft Filter, what is that for? I tried plugging there the content of the folder gfxfilter, is that correct? What is the Soft Filter option for, and how can I use the gfxfilter plugins? It contains shaders like the amazing blargg one, are those for a certain core or…

From Wikipedia’s page on NTSC: “The [NTSC] standard recommended a frame rate of 30 frames (images) per second, consisting of two interlaced fields per frame at 262.5 lines per field and 60 fields per second.” So, basically, it shows half of the total vertical resolution (~480 lines, usually) each frame (assuming 60 fps).

In an interlaced video, which fields are shown alternates back and forth between the even and odd fields for a total, full-res rate of 30 fps. In non-interlaced/“240p”, they show just the evens or just the odds twice, which allows them to do 60 fps in the same bandwidth, though it leaves blank lines in between where the alternate field should be.

I know how video works, but not how 240p used it for its convenience. You can only send 30 evens and 30 odd fields per second, so there are still 30 more to make it 60fps. I was reading the explanation here but still wondering about it. Per nature a CRT deinterlaces, so it needs both fields, if you only use one field type you are bound to 30fps.

Or… do you mean that the consoles tagged fields to only be even (or odd)? That is quite a dirty hack if you ask me.

T(FF)
# (frame number)
1  2  3..30
TT TT TT TT