Shader Reference

The core of Cathode Retro is a series of shaders that, combined, create the effect of an NTSC signal running on a CRT TV or monitor.

This section contains reference information about all of the various shaders and shader headers.

For information about how these shaders are intended to chain together, see the Getting Started: The Shaders page.

Utility Shader Headers

Distort a given texture coordinate to emulate a curved CRT screen
Separable Lanczos2 downsample
Common header for all shaders, providing cross-platform (HLSL and GLSL) macros and functions
Some noise generators
Calculate the per-scanline instability noise

Utility Shaders

A simple quad in/quad out vertex shader
Shader that just writes out the texture directly (for copying textures)
Do a separable 2x downsample
13-tap separable gaussian blur
Does both a basic tonemap (for the diffusion shader) as well as a downsample

Generator Shaders

Apply ghosting and noise to an S-Video or Composite signal
Generate the phase of the colorburst for each scanline
Take an RGB image and turn it into either an S-Video or Composite signal

Decoder Shaders

Break a composite signal apart into its separate luma and chroma signals
Do a blur or sharpen on an RGB texture
Run demodulation on an S-Video signal to prepare for conversion to RGB
Take an S-Video signal (and its pre-modulated chroma) and converts it to RGB

CRT Shader Headers

Distort a given texture coordinate to emulate a curved CRT screen.

CRT Shaders

Generate a texture representing an aperture grille, one of the CRT mask options
Generate a full-output-sized texture with the CRT mask overlay and a mask channel
Generate a texture representing a shadow mask, one of the CRT mask options
Generate a texture representing a slot mask, one of the CRT mask options
Take an RGB input image and run it through an emulation of a CRT screen