Class TextModeCRTSettings
Every parameter of the simulated cathode ray tube: the source raster, the beam, the mask, the phosphor, the glow, the tube geometry and the signal.
Inherited Members
Namespace: Scylla.TextMode.CRT
Assembly: ScyllaTextMode.CRT.dll
Syntax
[Serializable]
public sealed class TextModeCRTSettings
Remarks
A TextModeCRTPreset stores one of these, and a TextModeCRTDriver holds its own copy, which starts as a copy of its preset and can then be edited freely. Copy values between instances with CopyFrom(TextModeCRTSettings), which does not allocate.
Colors are authored like any other Inspector color and converted to linear light where the shader needs it. Time constants are in milliseconds.
Fields
BeamBlend
How much the beams of neighboring scanlines overlap. 0 draws every pixel from its own scanline only; 1 sums the neighboring beams, as on a real tube.
Declaration
[Tooltip("How much neighboring scanlines spill into each other. 0 draws every pixel from its own scanline, which keeps thin dark text on a bright background crisp. 1 lets bright lines bleed into their neighbors as on a real tube, which looks softer and washes out dark text on bright backgrounds.")]
[Range(0, 1)]
public float BeamBlend
Field Value
| Type | Description |
|---|---|
| float |
BeamWidthMax
Width of the electron beam on the brightest content, in scanlines (Gaussian sigma).
Declaration
[Tooltip("Width of the electron beam on bright content, in scanlines. A real beam widens with brightness, so bright lines come closer together than dark ones. Keep it near 0.3 for visible scanlines; above 0.4 bright text shows none.")]
[Range(0.1, 1)]
public float BeamWidthMax
Field Value
| Type | Description |
|---|---|
| float |
Remarks
A real beam widens as it gets brighter, so bright lines sit closer together than dark ones. The range is MIN_BEAM_WIDTH to MAX_BEAM_WIDTH. This value may stay below BeamWidthMin; the composite then draws the bright beam at least as wide as the dark one (see Sanitize()).
BeamWidthMin
Width of the electron beam on the darkest content, in scanlines. The value is the sigma of the Gaussian that models the beam's vertical profile.
Declaration
[Header("Beam")]
[Tooltip("Width of the electron beam on dark content, in scanlines. Values around 0.2 leave clear dark gaps between scanlines; values above 0.4 close them.")]
[Range(0.1, 1)]
public float BeamWidthMin
Field Value
| Type | Description |
|---|---|
| float |
Remarks
Smaller values leave clearer dark gaps between scanlines. The range is MIN_BEAM_WIDTH to MAX_BEAM_WIDTH. BeamWidthMax sets the width for the brightest content, and the beam widens between the two as brightness rises.
BezelColor
Color of the bezel around the picture, and of any area that the rounded corners, the curvature or an Overscan below 1 leave outside the tube.
Declaration
[Tooltip("Color of the bezel around the picture, and of the area rounded corners or curvature leave outside the tube.")]
public Color BezelColor
Field Value
| Type | Description |
|---|---|
| Color |
Remarks
BezelWidth controls whether a bezel frame is drawn around the picture at all.
BezelReflection
How strongly the inner edge of the bezel reflects the picture.
Declaration
[Tooltip("How strongly the inner edge of the bezel reflects a blurred copy of the picture.")]
[Range(0, 1)]
public float BezelReflection
Field Value
| Type | Description |
|---|---|
| float |
BezelWidth
Width of the bezel framing the tube, as a fraction of the picture height. 0 shows no bezel.
Declaration
[Tooltip("Width of the bezel around the picture, as a fraction of its height. The picture shrinks to make room for it. 0 shows no bezel.")]
[Range(0, 0.25)]
public float BezelWidth
Field Value
| Type | Description |
|---|---|
| float |
Brightness
Brightness gain applied after tube response, saturation and contrast, from 0 (black) to 2. The default 1 leaves brightness unchanged.
Declaration
[Tooltip("Brightness of the picture, like the brightness knob of a monitor.")]
[Range(0, 2)]
public float Brightness
Field Value
| Type | Description |
|---|---|
| float |
BurnIn
How visible burn-in is. 0 turns it off.
Declaration
[Tooltip("How visible burn-in is. Content that stays on screen for a long time leaves a faint ghost and dims the phosphor where it was. 0 turns burn-in off.")]
[Range(0, 1)]
public float BurnIn
Field Value
| Type | Description |
|---|---|
| float |
BurnInTime
Seconds a full-brightness picture takes to burn in completely.
Declaration
[Tooltip("Seconds a full-brightness picture takes to burn in completely. Burn-in lasts for the session.")]
[Range(1, 36000)]
public float BurnInTime
Field Value
| Type | Description |
|---|---|
| float |
CRTGamma
Gamma exponent of the simulated tube, from 1 to 3. The default 2.4 matches the BT.1886 reference.
Declaration
[Header("Signal")]
[Tooltip("Response curve of the tube. CRTs were close to 2.4, which is slightly darker in the shadows than the 2.2 the content was made for.")]
[Range(1, 3)]
public float CRTGamma
Field Value
| Type | Description |
|---|---|
| float |
Remarks
The shader applies the ratio CRTGamma divided by DisplayGamma to the picture. When both values are equal the ratio is 1 and the step is skipped, so the colors stay untouched.
ChromaBandwidth
Bandwidth of the color signal in MHz. Lower values smear color further along each line.
Declaration
[Tooltip("Bandwidth of the color signal in MHz. Most home televisions decoded about 0.6 MHz, which smears color visibly; broadcast NTSC carried up to 1.3 MHz, a VHS tape about 0.5. Lower values smear colors further to the right and left of where they belong.")]
[Range(0.1, 4)]
public float ChromaBandwidth
Field Value
| Type | Description |
|---|---|
| float |
ColorTemperature
White point of the tube in kelvin. The default NEUTRAL_COLOR_TEMPERATURE (6500 K) leaves white neutral; higher values shift it toward blue and lower values toward orange.
Declaration
[Tooltip("White point of the tube in kelvin. Many sets, especially Japanese ones, ran at 9300 K, which is noticeably blue.")]
[Range(3000, 12000)]
public float ColorTemperature
Field Value
| Type | Description |
|---|---|
| float |
Remarks
The range is MIN_COLOR_TEMPERATURE to MAX_COLOR_TEMPERATURE.
CombFilter
Whether an NTSC composite decoder separates color with a comb filter, which compares each scanline with the one before it.
Declaration
[Tooltip("Separates color from brightness by comparing each scanline with the one before it, as better televisions did from the late 1980s on. Removes most rainbow fringes and dot crawl on text. Turn it off for the heavier look of a cheap set. Needs NTSC with a line shift of 0.5; PAL uses its delay line instead.")]
public bool CombFilter
Field Value
| Type | Description |
|---|---|
| bool |
Contrast
Contrast around mid gray, from 0 to 2. The default 1 leaves contrast unchanged; the shader skips the step at exactly 1.
Declaration
[Tooltip("Contrast of the picture, like the contrast knob of a monitor.")]
[Range(0, 2)]
public float Contrast
Field Value
| Type | Description |
|---|---|
| float |
Convergence
Convergence error at the edges of the picture, in screen pixels: the red beam lands outward and the blue beam inward, growing from nothing in the center.
Declaration
[Tooltip("How far the red and blue beams miss the green one at the edges of the picture, in screen pixels. Red lands outward and blue inward, so bright edges get colored fringes that grow toward the corners. 0 is a perfectly converged tube.")]
[Range(0, 4)]
public float Convergence
Field Value
| Type | Description |
|---|---|
| float |
CornerRadius
Rounding of the corners of the visible picture, as a fraction of the picture's half extent. 0 keeps square corners; the maximum is 0.25.
Declaration
[Tooltip("How rounded the corners of the visible picture are. 0 keeps square corners.")]
[Range(0, 0.25)]
public float CornerRadius
Field Value
| Type | Description |
|---|---|
| float |
Remarks
The area cut away by the rounded corners shows the BezelColor.
Curvature
Strength of the barrel distortion on the horizontal (x) and vertical (y) axis. Only used while CurvatureEnabled is on.
Declaration
[Tooltip("How strongly the picture bends with the glass when curvature is on, per axis. Values above 0.06 make the corners of an 80 column screen hard to read.")]
public Vector2 Curvature
Field Value
| Type | Description |
|---|---|
| Vector2 |
Remarks
Each component is clamped to 0 to MAX_CURVATURE. The middle of each edge stays on the raster edge and only the corners bend away.
CurvatureEnabled
Whether the picture bends with a curved faceplate. Off by default.
Declaration
[Header("Geometry")]
[Tooltip("Bends the picture as if the front glass were curved. Off by default; a flat picture keeps every character where the plain view had it.")]
public bool CurvatureEnabled
Field Value
| Type | Description |
|---|---|
| bool |
CurvatureShape
Shape of the faceplate when CurvatureEnabled is on.
Declaration
[Tooltip("Shape of the front glass when curvature is on. Aperture grille tubes are curved only horizontally.")]
public CRTCurvatureShape CurvatureShape
Field Value
| Type | Description |
|---|---|
| CRTCurvatureShape |
DecayFast
Time constant of the quick initial fade of the phosphor, in milliseconds, for the red (x), green (y) and blue (z) channel. Each component is clamped to 0 to MAX_DECAY_FAST_MS.
Declaration
[Tooltip("Time constant of the quick initial fade per color channel (red, green, blue), in milliseconds.")]
public Vector3 DecayFast
Field Value
| Type | Description |
|---|---|
| Vector3 |
DecaySlow
Time constant of the long, faint tail of the phosphor, in milliseconds, for the red (x), green (y) and blue (z) channel. Each component is clamped to 0 to MAX_DECAY_SLOW_MS.
Declaration
[Tooltip("Time constant of the long faint tail per color channel (red, green, blue), in milliseconds. Long-persistence green tubes keep a trail for up to two seconds.")]
public Vector3 DecaySlow
Field Value
| Type | Description |
|---|---|
| Vector3 |
DisplayGamma
Gamma exponent of the content, from 1 to 3. The default 2.2 suits ordinary text and pixel art.
Declaration
[Tooltip("Response curve the content was made for. Leave at 2.2 for text and pixel art; set both gamma values to 1 to leave colors untouched.")]
[Range(1, 3)]
public float DisplayGamma
Field Value
| Type | Description |
|---|---|
| float |
Remarks
See CRTGamma for how the two values combine.
ExactScanlinePitch
Whether ScanlinePitch is used exactly as set. Off, the pitch is lowered for small text so every character row keeps enough scanlines to stay readable; on, it is kept even when that makes small text harder to read. Meant for a pitch someone chose on purpose, such as one set at runtime, rather than a preset's general default.
Declaration
[Tooltip("Uses the scanline pitch exactly as set, without lowering it for small text. Turn on for a pitch chosen on purpose; small text may get too few scanlines to read well.")]
public bool ExactScanlinePitch
Field Value
| Type | Description |
|---|---|
| bool |
GlowFalloff
Weight of each deeper pyramid level when the glow is assembled.
Declaration
[Tooltip("Weight of each deeper blur level. Higher values give a wider, softer glow.")]
[Range(0.1, 1)]
public float GlowFalloff
Field Value
| Type | Description |
|---|---|
| float |
GlowLevels
Number of blur pyramid levels. More levels spread the halation further.
Declaration
[Tooltip("Depth of the blur pyramid. Deeper pyramids spread the halation further.")]
[Range(1, 6)]
public int GlowLevels
Field Value
| Type | Description |
|---|---|
| int |
GlowStrength
Strength of the beam bloom, a short-range glow around bright pixels.
Declaration
[Header("Glow")]
[Tooltip("Strength of the short glow around bright pixels, from light scattering close to the beam. Medium and High quality only.")]
[Range(0, 1)]
public float GlowStrength
Field Value
| Type | Description |
|---|---|
| float |
HDRMask
Whether the mask runs at full strength on an HDR display, with its brightness recovered from the display's headroom. Where HDR cannot reach the picture, MaskStrength is used as usual. See CRTHDR.
Declaration
[Tooltip("Shows the mask at full strength and recovers its brightness from an HDR display's headroom. On a standard display, or where HDR cannot reach the picture, Mask Strength is used.")]
public bool HDRMask
Field Value
| Type | Description |
|---|---|
| bool |
HalationStrength
Strength of the halation, a wide glow from light scattering inside the faceplate glass.
Declaration
[Tooltip("Strength of the wide, faint glow from light scattering inside the thick front glass. Medium and High quality only.")]
[Range(0, 0.5)]
public float HalationStrength
Field Value
| Type | Description |
|---|---|
| float |
HorizontalKernel
Filter that models the beam's horizontal softness.
Declaration
[Tooltip("Filter that models how the picture blurs along each scanline. Gaussian is smooth, Lanczos2 is sharper with a slight edge overshoot.")]
public CRTHorizontalKernel HorizontalKernel
Field Value
| Type | Description |
|---|---|
| CRTHorizontalKernel |
HorizontalSoftness
Width of the Gaussian horizontal filter, in source pixels.
Declaration
[Tooltip("How soft the picture is along each scanline, in source pixels. With characters rendered at screen size, a source pixel is a screen pixel. Only used by the Gaussian filter.")]
[Range(0.1, 3)]
public float HorizontalSoftness
Field Value
| Type | Description |
|---|---|
| float |
HumBar
Strength of the hum bar: a broad band of brighter and darker picture that rolls slowly up or down, from mains hum in the signal.
Declaration
[Tooltip("Strength of the hum bar, a broad band of slightly brighter and darker picture that rolls slowly through it, caused by mains hum on the signal. Needs a signal other than RGB.")]
[Range(0, 0.5)]
public float HumBar
Field Value
| Type | Description |
|---|---|
| float |
HumBarSpeed
How fast the hum bar moves, in picture heights per second. Negative values move it up.
Declaration
[Tooltip("How fast the hum bar moves, in picture heights per second. Negative values move it upward.")]
[Range(-2, 2)]
public float HumBarSpeed
Field Value
| Type | Description |
|---|---|
| float |
Jitter
How far each scanline wobbles sideways, in screen pixels, as when the set struggles to lock onto the horizontal sync.
Declaration
[Tooltip("How far each scanline wobbles sideways, in screen pixels, as when a set struggles to hold the horizontal sync. Needs a signal other than RGB.")]
[Range(0, 8)]
public float Jitter
Field Value
| Type | Description |
|---|---|
| float |
LumaBandwidth
Bandwidth of the brightness signal in MHz. Lower values blur fine detail along each line.
Declaration
[Tooltip("Bandwidth of the brightness signal in MHz. Broadcast NTSC carries about 4.2 MHz, a VHS tape about 3. Lower values blur fine detail along each scanline.")]
[Range(0.5, 8)]
public float LumaBandwidth
Field Value
| Type | Description |
|---|---|
| float |
MaskPeriodOverride
Fixed mask period in output pixels, or 0 to derive it from MaskTVL. Periods from TEXTURE_MASK_MIN_PERIOD up use the texture mask while TextureMask is on.
Declaration
[Tooltip("Fixed width of one mask triad in screen pixels. Below 6 it is rounded to 2, 3, 4 or 6; from 6 up the texture mask draws it exactly. Leave at 0 to derive it from the TVL value.")]
[Range(0, 24)]
public int MaskPeriodOverride
Field Value
| Type | Description |
|---|---|
| int |
MaskStrength
How strongly the mask shows. 1 is a physically complete mask.
Declaration
[Tooltip("How strongly the mask shows. 1 is a physically complete mask, which is dim on a standard display because each subpixel lets only one color through.")]
[Range(0, 1)]
public float MaskStrength
Field Value
| Type | Description |
|---|---|
| float |
MaskTVL
Mask density in triads per screen height, which sets the mask period on screen. Ignored when MaskPeriodOverride is above 0.
Declaration
[Tooltip("Density of the mask in color triads per screen height. Consumer sets had a few hundred, professional monitors 600 and more. Below 6 pixels per triad the period is rounded to 2, 3, 4 or 6 pixels; from 6 pixels up the texture mask draws it exactly.")]
[Range(100, 1200)]
public int MaskTVL
Field Value
| Type | Description |
|---|---|
| int |
MaskType
The phosphor mask pattern.
Declaration
[Header("Mask")]
[Tooltip("The phosphor mask pattern. Monochrome tubes have none.")]
public CRTMaskType MaskType
Field Value
| Type | Description |
|---|---|
| CRTMaskType |
Monochrome
Whether the tube is monochrome. A monochrome tube shows how strongly each pixel is driven in PhosphorColor: the geometric mean of the pixel's luminance and its brightest color channel, which keeps saturated text bright and dark blues dark.
Declaration
[Tooltip("Shows the picture in a single phosphor color, as on green, amber and white monochrome monitors.")]
public bool Monochrome
Field Value
| Type | Description |
|---|---|
| bool |
Noise
Strength of the random snow added to the signal, as from a weak antenna signal.
Declaration
[Tooltip("Random snow in the picture, as from a weak antenna signal. 0.05 is a faint grain, 0.3 a poor reception. Needs a signal other than RGB.")]
[Range(0, 1)]
public float Noise
Field Value
| Type | Description |
|---|---|
| float |
Overscan
Scale of the visible picture relative to the raster. Values above 1 push the edge of the raster beyond the visible area, as a television did; 1 shows the whole raster.
Declaration
[Tooltip("Values above 1 push the edge of the picture behind the bezel, as on a television. 1 shows the whole raster.")]
[Range(0.9, 1.2)]
public float Overscan
Field Value
| Type | Description |
|---|---|
| float |
Remarks
The range is MIN_OVERSCAN to MAX_OVERSCAN. Below 1, the raster is smaller than the tube and a border in the BezelColor surrounds it.
PersistenceEnabled
Whether phosphor persistence is simulated (Medium and High tiers only).
Declaration
[Header("Phosphor")]
[Tooltip("Simulates the afterglow of the phosphor, which leaves trails behind moving and scrolling text. Medium and High quality only.")]
public bool PersistenceEnabled
Field Value
| Type | Description |
|---|---|
| bool |
PhosphorColor
Color of the phosphor of a monochrome tube. Only used while Monochrome is on. Each channel is clamped to 0 to 1.
Declaration
[Tooltip("Color of the phosphor when Monochrome is on.")]
public Color PhosphorColor
Field Value
| Type | Description |
|---|---|
| Color |
Saturation
Color saturation, from 0 to 2. 0 is grayscale, the default 1 leaves colors unchanged and values above 1 exaggerate them.
Declaration
[Tooltip("Color saturation. 0 is grayscale.")]
[Range(0, 2)]
public float Saturation
Field Value
| Type | Description |
|---|---|
| float |
ScaleMode
How the raster is fitted into the screen area.
Declaration
[Tooltip("How the picture is fitted into the view. Fit keeps the grid's shape, Integer also makes every scanline the same whole number of pixels tall, and Stretch fills the view.")]
public CRTScaleMode ScaleMode
Field Value
| Type | Description |
|---|---|
| CRTScaleMode |
ScanlinePitch
Height of one scanline in whole screen pixels, used when ScanlinesPerRow is 0.
Declaration
[Tooltip("Height of one scanline in whole screen pixels. Every scanline gets exactly this height, which keeps the pattern even. Unless Exact Scanline Pitch is on, it is lowered, down to 2, when a character row would otherwise get fewer than 9 scanlines (5 on a curved tube), so small text stays readable.")]
[Range(2, 8)]
public int ScanlinePitch
Field Value
| Type | Description |
|---|---|
| int |
ScanlinesPerRow
Fixed number of scanlines per character row, or 0 to derive it from ScanlinePitch.
Declaration
[Tooltip("Fixed number of scanlines per character row, such as 8 for a CGA-style raster. This aligns scanlines with the text rows, but they may then differ in height by a pixel. Leave at 0 to use the scanline pitch.")]
[Range(0, 32)]
public int ScanlinesPerRow
Field Value
| Type | Description |
|---|---|
| int |
Sharpness
Sharpening of the brightness signal, which rings as a light or dark halo beside edges.
Declaration
[Tooltip("Sharpening of the brightness signal, like the sharpness knob of a television. Edges get crisper, with a faint light or dark halo beside them.")]
[Range(0, 1)]
public float Sharpness
Field Value
| Type | Description |
|---|---|
| float |
SignalStandard
The broadcast standard of an S-Video, composite or RF signal.
Declaration
[Tooltip("The broadcast standard of the signal. NTSC is the North American and Japanese standard, PAL the European one.")]
public CRTSignalStandard SignalStandard
Field Value
| Type | Description |
|---|---|
| CRTSignalStandard |
SignalType
The kind of video connection that feeds the tube. Anything other than RGB runs the signal simulation, in the Medium and High quality tiers only.
Declaration
[Header("Video Signal")]
[Tooltip("The video connection that feeds the tube. RGB is a clean monitor cable. S-Video bleeds color. Composite and RF also mix brightness and color, which gives dot crawl, rainbow fringes and artifact colors. Needs quality medium or high.")]
public CRTSignalType SignalType
Field Value
| Type | Description |
|---|---|
| CRTSignalType |
SlotGap
Darkening of the row between two slots (slot mask only).
Declaration
[Tooltip("How dark the metal between two slots is. Slot mask only.")]
[Range(0, 1)]
public float SlotGap
Field Value
| Type | Description |
|---|---|
| float |
SlotHeight
Height of one slot in output pixels (slot mask only).
Declaration
[Tooltip("Height of one slot in screen pixels. Slot mask only.")]
[Range(2, 8)]
public int SlotHeight
Field Value
| Type | Description |
|---|---|
| int |
SlowWeight
Brightness of the slow tail relative to the original light.
Declaration
[Tooltip("Brightness of the long tail relative to the original light.")]
[Range(0, 1)]
public float SlowWeight
Field Value
| Type | Description |
|---|---|
| float |
SourceCellSize
Size in pixels that each character is rendered at before the tube is simulated. Zero on either axis renders characters at their size on screen, which keeps text as sharp as the plain view.
Declaration
[Header("Source")]
[Tooltip("Size in pixels each character is rendered at before the tube is simulated. Leave at 0 x 0 to render characters at their size on screen, which keeps text sharp. A small size such as 8 x 8 gives blocky retro glyphs.")]
public Vector2Int SourceCellSize
Field Value
| Type | Description |
|---|---|
| Vector2Int |
StrokeSnap
How firmly each scanline snaps to the strokes it covers. 0 gives every scanline the plain average of the rows it covers, so a glyph edge that covers part of a line leaves a faint bar a whole scanline tall; 1 turns each line fully on or off.
Declaration
[Tooltip("How firmly each scanline snaps to the strokes it covers. 0 averages the rows, so glyph edges that cover part of a line leave faint smudges at the tops and bottoms of letters. Higher values turn such lines fully on or off, as on a terminal that draws text in whole scanlines. Near 1, strokes thinner than half a scanline can disappear.")]
[Range(0, 1)]
public float StrokeSnap
Field Value
| Type | Description |
|---|---|
| float |
Remarks
Within each scanline the brightness between the darkest and the brightest row it covers is pulled toward what the line's center row shows and then sharpened. 0, the default and the value every shipped preset uses, keeps the plain average. At 1 every line shows its center row alone, which can remove strokes thinner than half a scanline.
SubcarrierFieldShift
How far the subcarrier phase moves from one field to the next, in cycles. Nonzero values make dot crawl move.
Declaration
[Tooltip("How far the color subcarrier moves from one field to the next, in cycles. Half a cycle makes the dots along colored edges crawl, as on broadcast television. 0 keeps them still, as on most game consoles and home computers.")]
[Range(0, 1)]
public float SubcarrierFieldShift
Field Value
| Type | Description |
|---|---|
| float |
SubcarrierLineShift
How far the subcarrier phase moves from one scanline to the next, in cycles.
Declaration
[Tooltip("How far the color subcarrier moves from one scanline to the next, in cycles. NTSC broadcast moves half a cycle, which makes the dots of dot crawl form a checkerboard. 0 keeps every line in step, as on a CGA card, so artifact colors form clean vertical stripes.")]
[Range(0, 1)]
public float SubcarrierLineShift
Field Value
| Type | Description |
|---|---|
| float |
SubcarrierPeriod
Length of one color subcarrier cycle in source pixels, or 0 to use the broadcast length for the chosen standard across the picture width.
Declaration
[Tooltip("Length of one color subcarrier cycle in source pixels; for the camera effect, in screen pixels. Leave at 0 for the broadcast value, about 188 cycles across the picture for NTSC. 4 matches a CGA card in 80-column mode, where patterns of two lit and two dark pixels turn into artifact colors.")]
[Range(0, 16)]
public float SubcarrierPeriod
Field Value
| Type | Description |
|---|---|
| float |
TextureMask
Whether a mask whose triads are at least TEXTURE_MASK_MIN_PERIOD pixels wide is drawn from a texture with the shapes of real phosphors, dots and rounded slots, at its exact period. Smaller masks always use the procedural pattern, so this changes nothing below that size.
Declaration
[Tooltip("Draws a mask with triads of 6 pixels or more from a texture with real phosphor shapes, at its exact size. Smaller masks are unchanged. Mostly matters at 4K and above, or with a low TVL.")]
public bool TextureMask
Field Value
| Type | Description |
|---|---|
| bool |
TubeBlack
Color of the unlit tube, which shows through transparent cell backgrounds.
Declaration
[Tooltip("Color of the unlit tube. It shows wherever a cell has a transparent background. Real tubes were dark gray glass rather than pure black.")]
public Color TubeBlack
Field Value
| Type | Description |
|---|---|
| Color |
VerticalRoll
How fast the picture rolls vertically, in picture heights per second, as when a set loses the vertical sync. 0 keeps it still.
Declaration
[Tooltip("How fast the whole picture rolls vertically, in picture heights per second, as when a set loses the vertical sync. 0 keeps it still. Needs a signal other than RGB.")]
[Range(-2, 2)]
public float VerticalRoll
Field Value
| Type | Description |
|---|---|
| float |
Vignette
How much the picture darkens toward its edges and corners, from 0 (no darkening) to 1. The falloff grows with the squared distance from the center of the glass.
Declaration
[Tooltip("How much the picture darkens toward the edges.")]
[Range(0, 1)]
public float Vignette
Field Value
| Type | Description |
|---|---|
| float |
WarmUpTime
Seconds the tube takes to reach full brightness after PowerOn().
Declaration
[Header("Tube")]
[Tooltip("Seconds the tube takes to reach full brightness and focus after it is switched on. 0 switches on at once.")]
[Range(0, 10)]
public float WarmUpTime
Field Value
| Type | Description |
|---|---|
| float |
Methods
ApplyReadabilityClamp()
Limits the values that cost legibility: softness, curvature, glow, persistence, mask strength, noise, jitter, the hum bar, convergence and burn-in, and stops the vertical roll and HDR mask mode, whose full-strength mask costs legibility even at full brightness. Used for screens the player has to read quickly.
Declaration
public void ApplyReadabilityClamp()
Clone()
Creates an independent copy.
Declaration
public TextModeCRTSettings Clone()
Returns
| Type | Description |
|---|---|
| TextModeCRTSettings | A new instance holding the same values. |
CopyFrom(TextModeCRTSettings)
Copies every value from another instance without allocating.
Declaration
public void CopyFrom(TextModeCRTSettings other)
Parameters
| Type | Name | Description |
|---|---|---|
| TextModeCRTSettings | other | The settings to copy. Ignored when null. |
Sanitize()
Clamps every value into its valid range, so values set from code or loaded from an older asset cannot break the shader.
Declaration
public void Sanitize()
UsesCombFilter()
Returns whether the composite decoder uses its comb filter: CombFilter is on, the signal is composite or RF, the standard is NTSC and the subcarrier is inverted from one scanline to the next.
Declaration
public bool UsesCombFilter()
Returns
| Type | Description |
|---|---|
| bool | True if the decoder separates color with the comb filter. |
Remarks
The comb subtracts the previous scanline, which cancels brightness and keeps color only when the subcarrier is inverted between the two lines. With any other line shift it would cancel the color instead, so it is left out.
UsesGlow(CRTQualityTier)
Returns whether the glow pyramid runs at a quality tier: the tier is Medium or High, and something reads the pyramid there. That is glow, halation at High (Medium has none), or a bezel with a reflection, which mirrors the smallest glow level at Medium and High.
Declaration
public bool UsesGlow(CRTQualityTier tier)
Parameters
| Type | Name | Description |
|---|---|---|
| CRTQualityTier | tier | The quality tier. |
Returns
| Type | Description |
|---|---|
| bool | True if the glow passes run. |
UsesSignal(CRTQualityTier)
Returns whether the video signal is simulated at a quality tier: the signal type is not RGB and the tier is Medium or High.
Declaration
public bool UsesSignal(CRTQualityTier tier)
Parameters
| Type | Name | Description |
|---|---|---|
| CRTQualityTier | tier | The quality tier. |
Returns
| Type | Description |
|---|---|
| bool | True if the signal passes run. |