New CRT shader from Guest + CRT Guest Advanced updates

maybe this can make it in official releases too, as a parameter, something like “NTSC Pro” or “Real NTSC”, I think BVM do decoding with different bandwidths for I and Q so maybe “BVM NTSC”?

1 Like

Custom ntsc pass 2 wasn’t / will not be affected by the latest updates and has seperate I and Q handling:

https://mega.nz/file/N9ZQ1B7S#a3L50zSaWDfT1bswmmgqNf5As6pdTSVCBZQr4juFsO8

But i don’t want to add new presets lightly, nor “destroy” many existing presets. New chroma limit feature is independent from existing presets, so it can be added to new releases without problems.

1 Like

New Release Version (2025-10-18-r1):

Notable changes:

  • pal luma noise option added
  • ntsc and pal versions: signal desaturation (safe voltages) feature added
  • update: feature smooth parametrization

Download link:

https://mega.nz/file/J1YhhLpK#qpaDOOUV2AUhdYGRPoTJMKqhf1r0iquGrAh2Va_RtQU

4 Likes

is it mandatory? I cant see a parameter for it

1 Like

Ahh, please re-download.

1 Like

without safe

with safe

IIRC, I think this make it similar to how I saw NTSC in the SONY 27’ from the 80s

1 Like

Thanks for testing, i also added some parameter mid-value options for better tuning, new DL is available.

1 Like

Hello my old friends and all the new people that share the love for the CRT simulations. I finally got myself a new computer, and can run all the shaders properly at big resolutions. Was really looking forward to this. By courtesy of guest’s insane shader, enter Pulstar :slight_smile:

To my eyes, it just doesn’t get better than this.

4 Likes

Heya @Squalo! Nice to see you return! Also a nice screenie here. Hope you stay a while, like in old times. :smiley:

Meanwile i’m testing the pal shader on appropriate content. I’m tempted to revisit some even older times.

2 Likes

This is a great start! I dug up some additional info with the help of ChatGPT so it can be further refined :smiley:

There are two ways in which saturation is limited during the encoding process:

  1. Frequency-domain control → shaping Y, I, and Q bandwidths to fit into the 4.2 MHz composite channel cleanly.

The encoder is designed — both in analog filters and in the NTSC encoding matrix — to restrict each channel’s frequency range before combining them:

Channel Function Typical Bandwidth Controlled By
Y (Luminance) Brightness and detail ~4.2 MHz (up to the system limit) Low-pass filter in the luma path
I (In-phase chroma) Orange–cyan color detail ~1.3 MHz Band-pass filter in the I path
Q (Quadrature chroma) Green–magenta color detail ~0.4 MHz Band-pass filter in the Q path

So, in the shader, we need to start by restricting the bandwidths to these levels - this itself is going to cause some saturation loss.

  1. Amplitude-domain control → scaling Y and C so that their sum doesn’t exceed 1 V p-p.

However — those bandwidth filters do not guarantee that the resulting composite waveform’s voltage stays within legal limits (typically 1.0 V peak-to-peak for baseband composite, or 100% modulation when RF-modulated).

That’s where amplitude control comes in:

The encoder scales or limits chroma amplitude so that, when it’s added to luma, the waveform never exceeds the maximum allowed voltage.

This is typically handled via a matrix scaling factor, or sometimes via a soft limiter circuit if saturation is pushed too high.

Here’s a deeper dive:

:art: 1. Components of NTSC Composite

The NTSC baseband composite video signal (the 1 V p-p signal that leaves the encoder) is made up of:

Vcomposite(t)=Y(t)+C(t)+sync/pedestal

Where:

Y(t) = luminance (brightness, black-and-white detail)

C(t) = chroma subcarrier — a high-frequency signal that encodes hue and saturation

sync/pedestal = negative-going sync pulses and blanking level (for timing)

:rainbow: 2. What “C” Really Is — the Chroma Subcarrier

The chroma component, C(t) C(t), is a sine-wave subcarrier (about 3.579545 MHz) that’s amplitude- and phase-modulated by the color difference signals (I and Q):

C(t)=I(t)⋅sin(ωc​t)+Q(t)⋅cos(ωc​t)

Here:

ωc is the angular frequency of the color subcarrier (3.58 MHz).

The phase of this carrier encodes the hue.

The amplitude encodes the saturation.

So C(t) is literally a rapidly oscillating sine wave whose amplitude and phase vary according to the desired color.

:gear: 3. Why Y + C Can Exceed Voltage Limits

Now, the encoder adds Y and C to form the composite signal:

Vcomposite(t)=Y(t)+C(t)

This means that when Y and C are in phase (their peaks line up), the sum can become larger than the legal 1 V p-p signal range. Conversely, if they’re out of phase, they can subtract and dip below the black level.

So, depending on the color and brightness combination, the combined waveform might go above or below the safe electrical limits — that’s color clipping.

:jigsaw: 4. How the Encoder Prevents That

To prevent over- or under-shoots, NTSC encoders perform amplitude-domain control — that is, they scale the Y and C components before adding them so the sum stays within bounds.

There are two main methods:

a. Static Scaling (Matrix Coefficients)

The YIQ → composite encoding matrix is designed so that fully saturated color bars fit exactly within 1 V p-p. That is, the chroma amplitude © is chosen so that the most extreme possible colors never drive the composite signal beyond limits.

b. Dynamic Limiting (Soft Knee or Clipping)

Some encoders or modulators add a soft limiter that gently compresses the chroma amplitude when it approaches the limit — a “soft-knee” saturation limiter. This keeps oversaturated signals from producing illegal voltage peaks without creating harsh distortion.

:zap: 5. Typical Composite Signal Amplitude Breakdown

For NTSC baseband video:

Component Approx. Range Notes
Sync tip 0 V (−40 IRE) Lowest point
Black level 0.3 V (0 IRE) “Pedestal” level
White level 1.0 V (100 IRE) Max Y (no chroma)
Color subcarrier © ±0.35 V typical Added on top of Y
Total composite ≈ 1.0 V p-p Must not exceed this
1 Like

Just a quick question…or 2. This new desaturation feature, does it replace the existing desaturation behaviour when reducing NTSC Resolution and Chroma Scale? Also, is there going to be a separate resaturation/colour boost knob or dial and is there any post desaturation, colour boosting/restoration being done automatically, by default in this new implementation?

2 Likes

The idea here is to use the existing “saturation” parameter (not NTSC saturation) to compensate. We can eyeball this. The automatic gain control and resaturation applied by the TV decoder is a very crude, uniform increase.

What gives composite video it’s unique color look is the uneven desaturation that occurs during the encoding process - some colors become more desaturated than others. After this, during the decoding process, a uniform saturation boost is applied (this is like increasing the “saturation” parameter by whatever). Finally, after decoding, the user has access to the saturation knob, and can do whatever with it (this is also like increasing the “saturation” parameter by whatever).

To be “hardware accurate” we would research the actual TVs - this is being done currently by a few talented individuals around here. This is “process accurate,” and since TVs varied widely in the decoding process we can eyeball the re-saturation part.

Ideas for further refinement:

  1. set defaults for I and Q bandwidths to the composite video standard for correct frequency-domain desaturation

  2. Add two options for amplitude-domain control a. Static Scaling (Matrix Coefficients) b. Dynamic Limiting (Soft Knee or Clipping)

@guest.r

2 Likes

that also in PAL

and in ntsc there will be also some hue changes too in some colors (as you can see in my konami image)

2 Likes

Corrected to say “composite” video :smiley:

2 Likes

A little extra on the decoder’s “resaturation stage”:

You don’t need anything fancier than a uniform saturation multiplier to reproduce this stage. That’s exactly what the fixed chroma gain was doing — applying a constant chroma amplitude scale.

If you want to be authentic:

  1. Apply a uniform multiplier to the chroma vector ( I/Q , U/V , or Cb/Cr ) before conversion to RGB.
  • Example: chroma *= 1.2; // equivalent to ~20% chroma gain
  1. Optionally, make that value configurable per “TV model” to simulate manufacturing variation:
  • Consumer TVs might use 1.1–1.3× nominal gain.
  • Professional monitors (PVM/BVM) would be closer to exactly 1.0×.
1 Like

It’s advancing in implementation, but it’s a pass1 separate feature, nothing to be worried about, even existing presets aren’t affected. There will be a knob for this, 100%.

1 Like

Thanks, not worried about breaking presets anymore. Just curious about the implementation.

1 Like

New Release Version (2025-10-18-r1):

Notable changes:

  • pal luma noise option added
  • ntsc and pal versions: signal desaturation (safe voltages) feature added
  • update: feature smooth parametrization
  • update: “authentic” implementation

Download link:

https://mega.nz/file/RtQxwSAD#3rC2VytZWatAzAhEOWMmzSG0wBMoTvQCcob-DuS0Nng

Also thanks to @Nesguy fo inspiration. :smiley:

5 Likes

Please don’t do this. “AI” just makes things up out of whole cloth constantly, and there is no way to tell unless you have expert level knowledge regarding literally every single detail or laboriously verify every detail using real sources.

1 Like

with new update

3 Likes