decoder-svideo-to-modulated-chroma
This shader takes an input S-Video signal and modulates the chroma channel with a reference waveform (relative to the per-scanline phase) in preparation for getting the I and Q chroma channels (of the YIQ color space) for conversion to RGB.
This is essentially a pre-pass for svideo-to-rgb, to avoid doing (with the standard filter sizes) 8 sines and cosines per output texel from that shader.
Index
Input Textures/Samplers
Uniform Buffer Values
Input Textures/Samplers
- g_sourceTexture
-
g_sourceTexture
Type
texture
(platform-specific)Description
This is a 2- or 4-component texture that contains either a single luma, chroma sample pair or two luma, chroma pairs of S-Video-like signal. It is 2 components if we have no temporal aliasing reduction (we're not blending two versions of the same frame), 4 components if we do. - g_sourceSampler
-
g_sourceSampler
Type
sampler
(platform-specific, does not exist on some platforms)Description
The sampler to use to sample g_sourceTexture.
This sampler should be set up for linear filtering and clamped addressing (no wrapping).
- g_scanlinePhases
-
g_scanlinePhases
Type
texture
(platform-specific)Description
This is a 1- or 2-component texture that contains the colorburst phase offsets for each scanline. It's 1 component if we have no temporal artifact reduction, and 2 if we do.
Each phase value in this texture is the phase in (fractional) multiples of the colorburst wavelength.
- g_scanlinePhasesSampler
-
g_scanlinePhasesSampler
Type
sampler
(platform-specific, does not exist on some platforms)Description
The sampler to use to sample g_scanlinePhases.
This sampler should be set up for linear filtering and clamped addressing (no wrapping).
Uniform Buffer Values
- g_samplesPerColorburstCycle
-
uint g_samplesPerColorburstCycle
Type
uint
Description
How many samples (horizontal texels) there are per each color wave cycle. - g_tint
-
float g_tint
Type
float
Description
A value representing the tint offset (in colorburst wavelengths) from baseline that we want to use. Mostly used for fun to emulate the tint dial of a CRT TV.
A value of
0.0
represents using the standard decoded colors. - g_inputWidth
-
uint g_filterDir
Type
uint
Description
The width of the input signal (in texels).