What is the source for the shader? I couldn’t find any info on it.
What’s it based on?
What is the source for the shader? I couldn’t find any info on it.
What’s it based on?
It’s a port of simoneT’s NTSC color shader from Asmodean’s PsxFX Shader Suite for ePSXe/Pete’s OGL2 plugin. It’s more apparent from this commit:
So it’s just a conversion to the NTSC color space? Does this mean we need rec 2020 for this?
It looks like it does a few stages, first linearizing, then switching to XYZ colorspace, then back to sRGB with 2.4 gamma instead of the 2.2 used to linearize. It doesn’t appear to be really doing anything NTSC-specific, just some gamma shuffling, i guess…?
It looks like it goes through like a dozen transformations to get to NTSC, lol. I don’t get it.
So basically it’s just doing …stuff?
Edit: ah, ok. I’m doing some reading and the conversion is pretty complex. I can’t tell if the shader is doing everything right but it kinda looks right, I guess
https://www.image-engineering.de/library/technotes/958-how-to-convert-between-srgb-and-ciexyz#
yeah, the conversions themselves seemed fine to me. I’m not sure what all it’s actually doing, though, beyond the gamma, unless those are lossy conversions.
The conversion in ntsc-colors is technically correct for converting NTSC color into sRGB, but it’s not what CRTs really did, generally. CRTs didn’t bother doing the gamma correction in their conversion. Instead, they only changed the chroma demodulation, and that meant they could only approximate NTSC color, unlike this shader which tries to do it exactly. This shader also uses the standard sRGB piecewise EOTF, but my own display is closer to a straight 2.2 power law, and I’ve heard somewhere that this is more common.
I’ve just posted an updated version of my NTSC emulation which improves the NTSC color simulation, and one of the presets lets you use the NTSC color on its own. It also changes the white balance and gamma, so be careful about that. When making shader presets, this should go right after the NTSC signal artifacts, and should replace whatever color simulation happens after.