Class TextModeConstants
Constants used throughout the TextMode module including shader property IDs, default values, and configuration limits.
Inherited Members
Namespace: Scylla.TextMode
Assembly: ScyllaTextMode.dll
Syntax
public static class TextModeConstants
Fields
AtlasSizeID
Shader property ID for the atlas texture dimensions (x=width, y=height).
Declaration
public static readonly int AtlasSizeID
Field Value
| Type | Description |
|---|---|
| int |
BlinkTimerID
Shader property ID for the cursor blink timer (0-1 oscillating).
Declaration
public static readonly int BlinkTimerID
Field Value
| Type | Description |
|---|---|
| int |
BoldWeightID
Shader property ID for the faux-bold stroke weight (in atlas texels).
Declaration
public static readonly int BoldWeightID
Field Value
| Type | Description |
|---|---|
| int |
BorderColorID
Shader property ID for the color of border cells.
Declaration
public static readonly int BorderColorID
Field Value
| Type | Description |
|---|---|
| int |
CELL_OFFSCREEN_SHADER_NAME
Shader name for the offscreen cell renderer, which draws a grid into a render texture at exact cell pixels.
Declaration
public const string CELL_OFFSCREEN_SHADER_NAME = "Scylla/TextMode/CellOffscreen"
Field Value
| Type | Description |
|---|---|
| string |
CELL_SHADER_NAME
Shader name for the main cell renderer.
Declaration
public const string CELL_SHADER_NAME = "Scylla/TextMode/Cell"
Field Value
| Type | Description |
|---|---|
| string |
CellBorderID
Shader property ID for the cell border around the content grid (x=left, y=top, z=right, w=bottom).
Declaration
public static readonly int CellBorderID
Field Value
| Type | Description |
|---|---|
| int |
CellBufferID
Shader property ID for the cell structured buffer.
Declaration
public static readonly int CellBufferID
Field Value
| Type | Description |
|---|---|
| int |
CellPixelsID
Shader property ID for the cell size in font metric units (advance width, line height).
Declaration
public static readonly int CellPixelsID
Field Value
| Type | Description |
|---|---|
| int |
CellSizeID
Shader property ID for the cell size in world units (x=width, y=height).
Declaration
public static readonly int CellSizeID
Field Value
| Type | Description |
|---|---|
| int |
ColumnsID
Shader property ID for the number of grid columns.
Declaration
public static readonly int ColumnsID
Field Value
| Type | Description |
|---|---|
| int |
CursorBlinkID
Shader property ID for the cursor blink toggle (0 = no blink, 1 = blink).
Declaration
public static readonly int CursorBlinkID
Field Value
| Type | Description |
|---|---|
| int |
CursorColorID
Shader property ID for the cursor color.
Declaration
public static readonly int CursorColorID
Field Value
| Type | Description |
|---|---|
| int |
CursorStyleID
Shader property ID for the cursor style (0=block, 1=underline, 2=bar).
Declaration
public static readonly int CursorStyleID
Field Value
| Type | Description |
|---|---|
| int |
DEFAULT_AMBIENT_PERIOD
Default length of one pass of an ambient effect, in seconds.
Declaration
public const float DEFAULT_AMBIENT_PERIOD = 1.5
Field Value
| Type | Description |
|---|---|
| float |
Remarks
Ambient effects repeat, so this is the period of the loop rather than how long the effect lasts. Slow enough that a pulse breathes rather than blinks.
DEFAULT_ASPECT_RATIO
Default monospace font aspect ratio (width / height) used when font metrics are unavailable.
Declaration
public const float DEFAULT_ASPECT_RATIO = 0.5
Field Value
| Type | Description |
|---|---|
| float |
DEFAULT_BOLD_WEIGHT
Default faux-bold stroke dilation for bold glyphs, in atlas texels. Converted to an SDF distance offset at render time using the font's atlas padding, so bold weight stays consistent regardless of how the font atlas was generated.
Declaration
public const float DEFAULT_BOLD_WEIGHT = 1.5
Field Value
| Type | Description |
|---|---|
| float |
DEFAULT_CHAR_SPACING
Default character spacing multiplier (1.0 = natural advance width, no extra spacing).
Declaration
public const float DEFAULT_CHAR_SPACING = 1
Field Value
| Type | Description |
|---|---|
| float |
DEFAULT_DECODE_DURATION
Default duration in seconds for a decode effect.
Declaration
public const float DEFAULT_DECODE_DURATION = 3
Field Value
| Type | Description |
|---|---|
| float |
Remarks
Longer than the general effect default because a decode is a sequence rather than a single move: it holds the region scrambled, resolves most of it, and then lets the last few cells trickle in. Squeezed into half a second none of those phases reads.
DEFAULT_EFFECT_DURATION
Default duration in seconds for a text effect that is not given one.
Declaration
public const float DEFAULT_EFFECT_DURATION = 0.5
Field Value
| Type | Description |
|---|---|
| float |
DEFAULT_EFFECT_SPEED
Default playback speed multiplier for text effects. A value of 2 plays an effect twice as fast without changing its configured duration.
Declaration
public const float DEFAULT_EFFECT_SPEED = 1
Field Value
| Type | Description |
|---|---|
| float |
DEFAULT_FONT_SIZE
Default font size in logical pixels.
Declaration
public const float DEFAULT_FONT_SIZE = 16
Field Value
| Type | Description |
|---|---|
| float |
DEFAULT_ITALIC_SHEAR
Default italic shear factor applied to UV coordinates.
Declaration
public const float DEFAULT_ITALIC_SHEAR = 0.2
Field Value
| Type | Description |
|---|---|
| float |
DEFAULT_LINE_HEIGHT
Default line height multiplier (1.0 = natural line height, no extra spacing).
Declaration
public const float DEFAULT_LINE_HEIGHT = 1
Field Value
| Type | Description |
|---|---|
| float |
DEFAULT_MAX_CONCURRENT_EFFECTS
Default number of effects a single player can run at once.
Declaration
public const int DEFAULT_MAX_CONCURRENT_EFFECTS = 16
Field Value
| Type | Description |
|---|---|
| int |
DEFAULT_PIXELS_PER_UNIT
Default pixels-per-unit conversion factor for world-space rendering.
Declaration
public const float DEFAULT_PIXELS_PER_UNIT = 80
Field Value
| Type | Description |
|---|---|
| float |
DEFAULT_SCROLLBACK_LINES
Default scrollback buffer size in lines.
Declaration
public const int DEFAULT_SCROLLBACK_LINES = 1000
Field Value
| Type | Description |
|---|---|
| int |
DEFAULT_SDF_SMOOTHING
Default SDF edge sharpness. One puts the anti-aliasing ramp exactly one screen pixel wide, which is as crisp as an edge gets without aliasing. Lower values soften it, higher values harden it further.
Declaration
public const float DEFAULT_SDF_SMOOTHING = 1
Field Value
| Type | Description |
|---|---|
| float |
Remarks
The value is a multiple of the field's real gradient rather than of TMP's
_GradientScale constant, so it means the same thing on every font whatever
atlas padding it was built with. Text rendered before that correction was about 1.8
times softer at this setting.
DEFAULT_SDF_THRESHOLD
Default SDF distance threshold for normal weight glyphs.
Declaration
public const float DEFAULT_SDF_THRESHOLD = 0.5
Field Value
| Type | Description |
|---|---|
| float |
DEFAULT_SETPIECE_DURATION
Default duration in seconds for the set piece transitions.
Declaration
public const float DEFAULT_SETPIECE_DURATION = 2.5
Field Value
| Type | Description |
|---|---|
| float |
Remarks
Longer than an ordinary transition because these have something to say. Falling rain needs time to fall and a signal needs time to be found, and at the pace of a wipe neither reads as anything but a flicker.
DEFAULT_STRIKETHROUGH_POSITION
Default strikethrough vertical position relative to cell height (0=bottom, 1=top).
Declaration
public const float DEFAULT_STRIKETHROUGH_POSITION = 0.5
Field Value
| Type | Description |
|---|---|
| float |
DEFAULT_TAB_STOP_INTERVAL
Default tab stop interval in columns.
Declaration
public const int DEFAULT_TAB_STOP_INTERVAL = 8
Field Value
| Type | Description |
|---|---|
| int |
DEFAULT_TEXT_BLINK_RATE
Default text blink rate in full cycles per second (1.0 = one on/off cycle per second).
Declaration
public const float DEFAULT_TEXT_BLINK_RATE = 1
Field Value
| Type | Description |
|---|---|
| float |
DEFAULT_TRANSITION_DURATION
Default duration in seconds for a transition between two screens.
Declaration
public const float DEFAULT_TRANSITION_DURATION = 0.6
Field Value
| Type | Description |
|---|---|
| float |
Remarks
Long enough to read as a deliberate move between screens rather than a glitch, short enough not to make navigating an interface feel sluggish.
DEFAULT_TYPEWRITER_CPS
Default typing speed in characters per second for the typewriter effect.
Declaration
public const float DEFAULT_TYPEWRITER_CPS = 30
Field Value
| Type | Description |
|---|---|
| float |
DEFAULT_UNDERLINE_POSITION
Default underline vertical position relative to cell height (0=bottom, 1=top).
Declaration
public const float DEFAULT_UNDERLINE_POSITION = 0.1
Field Value
| Type | Description |
|---|---|
| float |
DEFAULT_UNDERLINE_THICKNESS
Default underline thickness relative to cell height.
Declaration
public const float DEFAULT_UNDERLINE_THICKNESS = 0.05
Field Value
| Type | Description |
|---|---|
| float |
DEFAULT_VIEW_HEIGHT
Default view height in world units for world-space rendering.
Declaration
public const float DEFAULT_VIEW_HEIGHT = 5
Field Value
| Type | Description |
|---|---|
| float |
DEFAULT_VIEW_WIDTH
Default view width in world units for world-space rendering.
Declaration
public const float DEFAULT_VIEW_WIDTH = 8
Field Value
| Type | Description |
|---|---|
| float |
DEFAULT_WRAP_MODE
Default text wrap mode used by PrintWrapped(int, int, int, string, Color32, Color32, CellAttributes).
Declaration
public const TextWrapMode DEFAULT_WRAP_MODE = Word
Field Value
| Type | Description |
|---|---|
| TextWrapMode |
FontAtlasID
Shader property ID for the SDF font atlas texture.
Declaration
public static readonly int FontAtlasID
Field Value
| Type | Description |
|---|---|
| int |
GridOffsetID
Shader property ID for the offset of the full grid from the top-left of a UI view's area, in canvas pixels (x, y), which centers the grid.
Declaration
public static readonly int GridOffsetID
Field Value
| Type | Description |
|---|---|
| int |
GridOriginID
Shader property ID for the grid origin position.
Declaration
public static readonly int GridOriginID
Field Value
| Type | Description |
|---|---|
| int |
InvertColorsID
Global shader property ID for inverted display: 1 while every TextMode color is shown inverted, 0 otherwise. Set by SetInverted(bool).
Declaration
public static readonly int InvertColorsID
Field Value
| Type | Description |
|---|---|
| int |
ItalicShearID
Shader property ID for the italic shear factor.
Declaration
public static readonly int ItalicShearID
Field Value
| Type | Description |
|---|---|
| int |
MAX_CELLS
Maximum cells in a single grid (prevents excessive GPU memory usage).
Declaration
public const int MAX_CELLS = 131072
Field Value
| Type | Description |
|---|---|
| int |
MAX_CELL_BORDER
Largest cell border a terminal setting accepts on one side, in cells.
Declaration
public const int MAX_CELL_BORDER = 64
Field Value
| Type | Description |
|---|---|
| int |
MAX_CELL_DURATION
Longest accepted share of the run that one cell may take. At 1 every cell animates for the whole duration, so the mask ordering has no visible effect.
Declaration
public const float MAX_CELL_DURATION = 1
Field Value
| Type | Description |
|---|---|
| float |
MAX_CHAR_SPACING
Maximum allowed character spacing multiplier.
Declaration
public const float MAX_CHAR_SPACING = 3
Field Value
| Type | Description |
|---|---|
| float |
MAX_COLUMNS
Maximum allowed grid columns.
Declaration
public const int MAX_COLUMNS = 512
Field Value
| Type | Description |
|---|---|
| int |
MAX_CONCURRENT_EFFECTS
Largest accepted concurrent effect limit. The player pre-allocates its registry to this size, so the ceiling exists to keep a misconfigured value from reserving a large array.
Declaration
public const int MAX_CONCURRENT_EFFECTS = 64
Field Value
| Type | Description |
|---|---|
| int |
MAX_EFFECT_DURATION
Longest accepted effect duration in seconds.
Declaration
public const float MAX_EFFECT_DURATION = 600
Field Value
| Type | Description |
|---|---|
| float |
MAX_EFFECT_SPEED
Fastest accepted effect speed multiplier.
Declaration
public const float MAX_EFFECT_SPEED = 100
Field Value
| Type | Description |
|---|---|
| float |
MAX_FONT_SIZE
Maximum allowed font size.
Declaration
public const float MAX_FONT_SIZE = 256
Field Value
| Type | Description |
|---|---|
| float |
MAX_LINE_HEIGHT
Maximum allowed line height multiplier.
Declaration
public const float MAX_LINE_HEIGHT = 3
Field Value
| Type | Description |
|---|---|
| float |
MAX_ROWS
Maximum allowed grid rows.
Declaration
public const int MAX_ROWS = 512
Field Value
| Type | Description |
|---|---|
| int |
MAX_TEXT_BLINK_RATE
Maximum allowed text blink rate.
Declaration
public const float MAX_TEXT_BLINK_RATE = 10
Field Value
| Type | Description |
|---|---|
| float |
MAX_TYPEWRITER_CPS
Fastest accepted typewriter speed in characters per second.
Declaration
public const float MAX_TYPEWRITER_CPS = 10000
Field Value
| Type | Description |
|---|---|
| float |
MIN_CELL_DURATION
Shortest accepted share of the run that one cell may take. Small enough to read as a hard edge sweeping across the region rather than a gradient.
Declaration
public const float MIN_CELL_DURATION = 0.001
Field Value
| Type | Description |
|---|---|
| float |
MIN_CHAR_SPACING
Minimum allowed character spacing multiplier.
Declaration
public const float MIN_CHAR_SPACING = 0.5
Field Value
| Type | Description |
|---|---|
| float |
MIN_COLUMNS
Minimum allowed grid columns.
Declaration
public const int MIN_COLUMNS = 1
Field Value
| Type | Description |
|---|---|
| int |
MIN_CONCURRENT_EFFECTS
Smallest accepted concurrent effect limit.
Declaration
public const int MIN_CONCURRENT_EFFECTS = 1
Field Value
| Type | Description |
|---|---|
| int |
MIN_EFFECT_DURATION
Shortest accepted effect duration. Zero is allowed and makes an effect finish on its first tick, which is how a disabled or reduced-motion effect resolves instantly.
Declaration
public const float MIN_EFFECT_DURATION = 0
Field Value
| Type | Description |
|---|---|
| float |
MIN_EFFECT_SPEED
Slowest accepted effect speed multiplier. Zero is excluded because an effect running at zero speed would never finish and would hold its region forever.
Declaration
public const float MIN_EFFECT_SPEED = 0.01
Field Value
| Type | Description |
|---|---|
| float |
MIN_FONT_SIZE
Minimum allowed font size.
Declaration
public const float MIN_FONT_SIZE = 1
Field Value
| Type | Description |
|---|---|
| float |
MIN_LINE_HEIGHT
Minimum allowed line height multiplier.
Declaration
public const float MIN_LINE_HEIGHT = 0.5
Field Value
| Type | Description |
|---|---|
| float |
MIN_PIXELS_PER_UNIT
Minimum allowed pixels-per-unit.
Declaration
public const float MIN_PIXELS_PER_UNIT = 1
Field Value
| Type | Description |
|---|---|
| float |
MIN_ROWS
Minimum allowed grid rows.
Declaration
public const int MIN_ROWS = 1
Field Value
| Type | Description |
|---|---|
| int |
MIN_TEXT_BLINK_RATE
Minimum allowed text blink rate.
Declaration
public const float MIN_TEXT_BLINK_RATE = 0.1
Field Value
| Type | Description |
|---|---|
| float |
MIN_TYPEWRITER_CPS
Slowest accepted typewriter speed in characters per second.
Declaration
public const float MIN_TYPEWRITER_CPS = 0.1
Field Value
| Type | Description |
|---|---|
| float |
MIN_VIEW_DIMENSION
Minimum allowed view dimension in world units.
Declaration
public const float MIN_VIEW_DIMENSION = 0.01
Field Value
| Type | Description |
|---|---|
| float |
RowsID
Shader property ID for the number of grid rows.
Declaration
public static readonly int RowsID
Field Value
| Type | Description |
|---|---|
| int |
SDFSmoothingID
Shader property ID for the SDF smoothing scale factor.
Declaration
public static readonly int SDFSmoothingID
Field Value
| Type | Description |
|---|---|
| int |
SDFThresholdID
Shader property ID for the SDF distance threshold.
Declaration
public static readonly int SDFThresholdID
Field Value
| Type | Description |
|---|---|
| int |
SRGB_CORRECTION_KEYWORD
Shader keyword that enables sRGB-to-linear conversion when unpacking cell colors. Required for correct color brightness in Linear color space rendering.
Declaration
public const string SRGB_CORRECTION_KEYWORD = "SRGB_CORRECTION"
Field Value
| Type | Description |
|---|---|
| string |
SelectionColorID
Shader property ID for the background of selected cells.
Declaration
public static readonly int SelectionColorID
Field Value
| Type | Description |
|---|---|
| int |
SelectionTextColorID
Shader property ID for the text color of selected cells.
Declaration
public static readonly int SelectionTextColorID
Field Value
| Type | Description |
|---|---|
| int |
StrikethroughPositionID
Shader property ID for the strikethrough vertical position in UV space.
Declaration
public static readonly int StrikethroughPositionID
Field Value
| Type | Description |
|---|---|
| int |
TextBlinkTimerID
Shader property ID for the text blink timer (0-1 oscillating), used by the Blink cell attribute.
Declaration
public static readonly int TextBlinkTimerID
Field Value
| Type | Description |
|---|---|
| int |
UI_CELL_SHADER_NAME
Shader name for the UI cell renderer.
Declaration
public const string UI_CELL_SHADER_NAME = "Scylla/TextMode/UICell"
Field Value
| Type | Description |
|---|---|
| string |
UnderlinePositionID
Shader property ID for the underline vertical position in UV space.
Declaration
public static readonly int UnderlinePositionID
Field Value
| Type | Description |
|---|---|
| int |
UnderlineThicknessID
Shader property ID for the underline thickness in UV space.
Declaration
public static readonly int UnderlineThicknessID
Field Value
| Type | Description |
|---|---|
| int |
VERTICAL_OVERHANG_MARGIN
Spare room in font units kept above and below the ink when deciding whether glyphs overhang their cell.
Declaration
public const float VERTICAL_OVERHANG_MARGIN = 2
Field Value
| Type | Description |
|---|---|
| float |
Remarks
A glyph's visible edge is not its ink boundary. Anti-aliasing softens the outermost texel, and bold weight dilates the stroke by a texel or so more, both of which reach slightly further than the font metrics say. Treating glyphs as overhanging a little before they truly do keeps that fringe intact; the cost of being generous is one extra pair of texture samples per pixel at line heights already close to the limit.
VerticalOverhangID
Shader property ID for how far glyphs reach past their own cell vertically, as a fraction of the cell height. Zero switches vertical neighbor sampling off.
Declaration
public static readonly int VerticalOverhangID
Field Value
| Type | Description |
|---|---|
| int |