Looking to combine an NTSC shader with koko-aio and a LUT

I have a preset mostly ready and intending to release using koko-aio and grade to add in a gamutthingy LUT that is tailored to a Mitsubishi CRT from the late 80s to early 90s. Within the LUT generation settings, I have already accounted for the console modulator color angles and gains, the CRT’s demodulator color angles and gains, average phosphor coordinates I found from a research paper, color temperature, and CRT black, white and clamp-high levels. Therefore, I would like to avoid any shader parameter that may interfere with my custom LUT but also want a robust NTSC shader capable of handling the chroma period ratios. I’m struggling to find one that covers every console (at the very least, Atari 2600, NES through N64, Sega up to Saturn, and PlayStation) or can have the knobs be more modular to keep my LUT from being affected (at first at least). patchy-ntsc and the ntsc shader within crt-consumer appear to be the closest, but I need some assistance to get those working for my needs.

Scanline Classic is capable of pretty accurate composite video simulation, however I only provide all-in-one (AIO) presets, not an individual NTSC preset. So if you are interested in using only the composite video side and using a different CRT shader I can help walk you through that. You will need a separate preset per system if you want to be accurate because of how RA works. I have already figured out the timings for a bunch of popular systems, but notably not the Saturn (it’s a pain in the ass; give me some time for it).

There are two parts to the composite pipeline which is the system side and the display side. They are completely separable, and you can bypass color correction entirely for your LUT application.

The AIO’s minimum requirement is a GT 1030 video card. Limiting to the composite side only(and not using the RF shaders) should allow requirements to be very low. If you want to run this on something embedded I would trial one of the AIO presets to see how it runs using a fast core like Mesen or something.

Basically, trial it first to see if it can work for you and I can help you get it to work with whatever other shaders you want.

2 Likes

I’ll take a rain check. I have spent countless hours already on getting koko-aio exactly how I want it. So, I rather not take on another all-in-one shader.

Your timings for NTSC and Genesis look really good (Sonic 3D Blast is what pushed me to seek out another NTSC shader, even though I like koko’s simple NTSC-like implementation). I was hoping to see it with more of a clean capture look, but I could not figure out which parameters to adjust to make that happen.

Regardless, I’m definitely looking towards the direction of per-system presets. I’m using multiple LUTs to account for the different encoders used among consoles, and I know from lidnariq of the NesDev forums that NTSC chroma period ratios can differ a lot by or within systems like PlayStation. So, I’m hoping any lingering timing details (with NesDev as a potential resource) can be eventually applied to the shaders.

Lastly, I do want to note that I’m coming from the land of the multi-system emulator ares. So, my shader presets, for me, will be ultimately run through librashader using full OpenGL.

Was that clean capture remark towards my shader? If you use the md preset in professional, that will be pretty clean. Then you can set ‘R/G/B cutoff attenuation’ to 0 dB. This will bypass the two RGB filter passes which should sharpen the entire image. The Y/C filtering is intrinsic to the composite emulation, so you don’t want to change that.

Once that filtering is bypassed, all that’s left is the CRT effects (scanlines, mask, etc.) You can also use the bypass parameters in the debug section, at the bottom of the parameter list.

I tried using Ares once and my presets didn’t work at all. At some point I’ll work on it, since I’m very interested in its N64 emulator.

Yes, it was. Sorry for not specifying.

The Y/C filtering actually ended up the being the part that needed changing. The R/G/B cutoff attenuation did not seem to do anything. I assume that’s because the color gains were set to 0 already. Anyhow, bypassing the Y filter brings back the color to Sonic 3D Blast’s cutscene letters. With the filter at default settings, everything looks to muted and a bit too separated. The following YouTube video shows the colors: https://www.youtube.com/watch?v=BNFioT1ha7U. I’m imagine that is not going to be the most representative of CRTs, but to my recollection, that is definitely closer to how I remembered the game.

As far as the rest of the shader goes, I am not really a bezel person, and I really like the fine control over the masks and phosphor positions I get from koko-aio. With that said, I certainly like the shader and not opposed to recommending it to those who seem to align best with the current set of features.

Concerning the presets not working in ares, I can definitely reach out to chyyran (the author of librashader) to see what’s going on. Once I’m finished with my preset pack, I intend to move towards checking most of the shaders through librashader to see what is not conforming.

In regards to filters, that’s just going to affect how blurry the image is, and the C filter affects color purity as well if it is set low enough, but otherwise should not cause muted colors. The default values of the Y/C filter are based on the MD schematic. An aging console will have a different response. In fact, I have seen several different consoles show very different degrees of rainbow artifact intensity. This console in particular is very inconsistent.

Another thing I should mention is the Y Notch system filter which can strongly impact what artifact colors appear. It can be turned off and on for comparison.

The conversion of blues in SDR is really harsh because of the limited dynamic range. That is probably what you are seeing as muted color (testing Sonic after all). This is because md preset uses NTSC-J colorimetry. You can either use gen (but that will lower black level) or change Colorimetry Preset to SMPTE, EBU, or 709. The WCG/HDR presets don’t have this problem.

The shader chain is separable by removing everything after limiter.slang. However, you’ll have the horizontal padding added to the signal. This means the frame will have the wrong aspect ratio. You need a shader to crop this or use a shader that allows for manual H-size adjust. Separating the shader here also eliminates the color correction, so you can use a LUT.

1 Like

The more muted of the two is the default gen preset. The other is with the Y lowpass set to 1.90 MHz.

I definitely understand that the Genesis is quite the mess when all the revisions, models, age, and quality control are all factored in. However, the default seems too muted for me and seems to be beyond the blue colors. Overall, I’m just surprised that it turned out like that with the schematic values used.

1 Like