generator-apply-artifacts
This shader applies ghosting and noise to an SVideo or Composite signal.
Noise is just that: some randomized signal offset per sample to simulate analog error in the signal (like "snow")
Ghosting basically is what happens when a copy of your signal "skips" its intended path through the cable and mixes in with your normal signal (like an EM leak of the signal) and is basically a pre-echo of the signal. So as a very rough approximation of this, we'll just blend in an offset, blurred, and scaled version of the original signal.
Index
Input Textures/Samplers
Uniform Buffer Values
Input Textures/Samplers
- g_sourceTexture
-
g_sourceTextureType
texture(platform-specific)Description
The texture to sample. - g_sampler
-
g_samplerType
sampler(platform-specific, does not exist on some platforms)Description
The sampler to use to sample g_sourceTexture.
Uniform Buffer Values
- g_ghostVisibility
-
float g_ghostVisibilityType
g_ghostVisibilityDescription
This represents how much ghosting is visible - 0.0is "no ghosting" and1.0is "the ghost is as strong as the original signal." - g_ghostDistance
-
float g_ghostDistanceType
floatDescription
This is the distance (in colorburst cycles) before the original signal that ghosting should appear. - g_ghostSpreadScale
-
float g_ghostSpreadScaleType
floatDescription
How far to blur the ghost, in colorburst cycles. - g_noiseStrength
-
float g_noiseStrengthType
floatDescription
The strength of noise to add to the signal - 0.0means no noise,1.0means, just, a lot of noise. So much. Probably too much. - g_noiseSeed
-
uint g_noiseSeedType
uintDescription
An integer seed used to generate the per-output-texel noise. This can be a monotonically-increasing value, or random every frame, just as long as it's different every frame so that the noise changes. - g_signalTextureWidth
-
uint g_signalTextureWidthType
uintDescription
The width of the input signal texture, in texels. - g_scanlineCount
-
uint g_scanlineCountType
uintDescription
The number of scanlines in this field of NTSC video (i.e. the height of the signal texture). - g_samplesPerColorburstCycle
-
uint g_samplesPerColorburstCycleType
uintDescription
How many samples (texels along a scanline) there are per colorburst cycle (the color wave in the composite signal)