generator-gen-phase
This shader generates the phase of the colorburst for each scanline.
Basically, outside of the visible portion of a color NTSC scanline, there is a colorburst which the TV uses to tell which color is the reference phase (which is yellow in color). We're not generating a full NTSC signal, but we still need to generate this data, and to do that we have a set of emulated timings for the virtual system that is generating our output.
Index
Uniform Buffer Values
Uniform Buffer Values
- g_initialFrameStartPhase
-
float g_initialFrameStartPhase
Type
float
Description
The colorburst phase (in fractional multiples of the colorburst wavelength) for the first scanline in our generated signal. - g_prevFrameStartPhase
-
float g_prevFrameStartPhase
Type
float
Description
The colorburst phase for the first scanline of the previous frame - this is used if we're generating two sets of phase information for use with temporal artifact reduction. - g_phaseIncrementPerScanline
-
float g_phaseIncrementPerScanline
Type
float
Description
The amount that the phase increments every scanline, in (fractional) multiples of the colorburst wavelength. - g_samplesPerColorburstCycle
-
uint g_samplesPerColorburstCycle
Type
uint
Description
How many samples (texels along a scanline) there are per colorburst cycle (the color wave in the composite signal) - g_instabilityScale
-
float g_instabilityScale
Type
float
Description
The scale of any picture instability (horizontal scanline-by-scanline tracking issues). This is used to ensure the phase values generated line up with the offset of the texture sampling that happens in the RGB to signal conversion. Must match the similarly-named value in rgb-to-svideo-or-composite. - g_noiseSeed
-
uint g_noiseSeed
Type
uint
Description
A seed for the noise used to generate the scanline-by-scanline picture instability. Must match the simiarly-named value in rgb-to-svideo-or-composite. - g_signalTextureWidth
-
uint g_signalTextureWidth
Type
uint
Description
The width of the signal texture that is being generated, in texels. - g_scanlineCount
-
uint g_scanlineCount
Type
uint
Description
The number of scanlines for this field of video (i.e. the height of the signal texture, in texels).