Scylla Framework
  • API Reference
Search Results for

    Show / Hide Table of Contents
    • Scylla.Console.TextMode
      • IConsoleScreen
      • TextModeDebugConsoleDisplay
      • TicTacToeCommand
      • TicTacToeScreen
    • Scylla.TextMode
      • ANSIAttributeParser
      • ANSIColor
      • ANSISGRAttributes
      • AmbientEffectBase
      • BackgroundBlendMode
      • BoxStyle
      • BoxStyleCharacters
      • BoxStyleCharacters.BoxChars
      • CRTSettings
      • Cell
      • CellAttributes
      • CellAttributesExtensions
      • CellBuffer
      • CellBufferRenderer
      • CellGrid
      • CellMask
      • CellPosition
      • CellRange
      • CellRect
      • ColorCycleEffect
      • ColorCycleEffectPreset
      • CrossFadeEffect
      • CursorStyle
      • DecodeEffect
      • DecodeEffectPreset
      • DigitalRainEffect
      • DigitalRainEffectPreset
      • EffectsSettings
      • FadeEffect
      • FadeEffectPreset
      • FlickerEffect
      • FlickerEffectPreset
      • GlitchEffect
      • GlitchEffectPreset
      • GlyphAtlasCache
      • GridSettings
      • IAutoCompleter
      • IInputHistory
      • ITextEffect
      • ITextEffectContext
      • ITextModeGridProvider
      • ITextModePointerMapper
      • ITextModeRenderSource
      • ITextModeViewHost
      • IVTParserHandler
      • InputHistory
      • MaskTransitionEffect
      • MouseEncodingMode
      • MouseTrackingMode
      • PackedGlyphData
      • PulseEffect
      • PulseEffectPreset
      • PushEffect
      • PushEffectPreset
      • SDFSettings
      • ScrollbackAttributeRun
      • ScrollbackLine
      • ScyllaTextMode
      • ScyllaTextMode.Meta
      • ScyllaTextModeConfiguration
      • SlideInEffect
      • SlideInEffectPreset
      • StaticTuneInEffect
      • StaticTuneInEffectPreset
      • TerminalCLI
      • TerminalEmulator
      • TerminalGridRenderer
      • TerminalInputEncoder
      • TerminalMouseButton
      • TerminalScrollbackBuffer
      • TerminalSettings
      • TextAlignment
      • TextEffectBase
      • TextEffectCompletedEvent
      • TextEffectDirection
      • TextEffectExtensions
      • TextEffectMaskPattern
      • TextEffectPreset
      • TextEffectPushMode
      • TextEffectSequencer
      • TextEffectStartedEvent
      • TextEffectState
      • TextEffectTimeMode
      • TextEffects
      • TextModeCellBorder
      • TextModeColorDefaults
      • TextModeColorScheme
      • TextModeColorSet
      • TextModeConfigurationChangedEvent
      • TextModeConsole
      • TextModeConstants
      • TextModeEffectPlayer
      • TextModeGridCapture
      • TextModeLayoutUtil
      • TextModeMaterials
      • TextModeMouseReporter
      • TextModeMouseReportingEvent
      • TextModeSelectionChangedEvent
      • TextModeSelectionEndedEvent
      • TextModeSelectionManager
      • TextModeSelectionStartedEvent
      • TextModeTerminal
      • TextModeTerminalColorTheme
      • TextModeTerminalHost
      • TextModeTerminalSettings
      • TextModeTerminalStartMode
      • TextModeThemeBackground
      • TextModeThemeChangedEvent
      • TextModeThemeRemapper
      • TextModeThemes
      • TextModeView
      • TextWrapMode
      • ThemeSettings
      • TransitionEffectBase
      • TransitionEffectPreset
      • TwinkleEffect
      • TwinkleEffectPreset
      • TypewriterCharacterRevealedEvent
      • TypewriterEffect
      • TypewriterEffectPreset
      • UITextModeView
      • VTParser
      • WaveEffect
      • WaveEffectPreset
    • Scylla.TextMode.CRT
      • CRTBeam
      • CRTBeamClock
      • CRTBeamScanDirection
      • CRTBeamStatus
      • CRTCalibrationPattern
      • CRTCurvatureShape
      • CRTGeometry
      • CRTHDR
      • CRTHDRDisplay
      • CRTHDRTarget
      • CRTHorizontalKernel
      • CRTImageRegion
      • CRTMaskType
      • CRTQualityTier
      • CRTScaleMode
      • CRTSignalStandard
      • CRTSignalType
      • ITextModeCRTCameraEffect
      • ITextModeCRTHDRDisplaySource
      • TextModeCRTBeam
      • TextModeCRTCalibration
      • TextModeCRTCameraEffects
      • TextModeCRTConstants
      • TextModeCRTDriver
      • TextModeCRTHDR
      • TextModeCRTImageRenderer
      • TextModeCRTMonitor
      • TextModeCRTPreset
      • TextModeCRTPresetRegistry
      • TextModeCRTScreen
      • TextModeCRTSettings
      • TextModeCRTTube
    • Scylla.TextMode.Editor
      • CellGridPreviewWidget
      • ColorPaletteWidget
      • ITextModeCRTCameraSetupProvider
      • ScyllaTextModeConfigurationEditor
      • ScyllaTextModeDependencyProvider
      • ScyllaTextModeEditor
      • ScyllaTextModeMenuItems
      • ScyllaTextModeShaderProvider
      • TextModeCRTCameraSetup
      • TextModeCRTCameraStatus
      • TextModeCRTDriverEditor
      • TextModeCRTMonitorEditor
      • TextModeCRTPresetEditor
      • TextModeCRTPresetGenerator
      • TextModeColorAssetGenerator
      • TextModeColorPaletteDefaults
      • TextModeTerminalHostEditor
      • TextModeThemeField
      • TextModeViewEditor
      • TextModeViewEditorBase
      • UITextModeViewEditor
    • Scylla.TextMode.URP
      • CRTQualityTierParameter
      • TextModeCRTInjectionPoint
      • TextModeCRTPresetParameter
      • TextModeCRTRendererFeature
      • TextModeCRTVolume

    Class TextModeCRTDriver

    Shows a TextMode view through a simulated cathode ray tube: scanlines, phosphor mask, afterglow, glow and a curved screen.

    Inheritance
    object
    Object
    Component
    Behaviour
    MonoBehaviour
    TextModeCRTDriver
    Inherited Members
    MonoBehaviour.IsInvoking()
    MonoBehaviour.CancelInvoke()
    MonoBehaviour.Invoke(string, float)
    MonoBehaviour.InvokeRepeating(string, float, float)
    MonoBehaviour.CancelInvoke(string)
    MonoBehaviour.IsInvoking(string)
    MonoBehaviour.StartCoroutine(string)
    MonoBehaviour.StartCoroutine(string, object)
    MonoBehaviour.StartCoroutine(IEnumerator)
    MonoBehaviour.StopCoroutine(IEnumerator)
    MonoBehaviour.StopCoroutine(Coroutine)
    MonoBehaviour.StopCoroutine(string)
    MonoBehaviour.StopAllCoroutines()
    MonoBehaviour.print(object)
    MonoBehaviour.destroyCancellationToken
    MonoBehaviour.useGUILayout
    MonoBehaviour.didStart
    MonoBehaviour.didAwake
    MonoBehaviour.runInEditMode
    Behaviour.enabled
    Behaviour.isActiveAndEnabled
    Component.GetComponent(Type)
    Component.GetComponent<T>()
    Component.TryGetComponent(Type, out Component)
    Component.TryGetComponent<T>(out T)
    Component.GetComponent(string)
    Component.GetComponentInChildren(Type, bool)
    Component.GetComponentInChildren(Type)
    Component.GetComponentInChildren<T>(bool)
    Component.GetComponentInChildren<T>()
    Component.GetComponentsInChildren(Type, bool)
    Component.GetComponentsInChildren(Type)
    Component.GetComponentsInChildren<T>(bool)
    Component.GetComponentsInChildren<T>(bool, List<T>)
    Component.GetComponentsInChildren<T>()
    Component.GetComponentsInChildren<T>(List<T>)
    Component.GetComponentInParent(Type, bool)
    Component.GetComponentInParent(Type)
    Component.GetComponentInParent<T>(bool)
    Component.GetComponentInParent<T>()
    Component.GetComponentsInParent(Type, bool)
    Component.GetComponentsInParent(Type)
    Component.GetComponentsInParent<T>(bool)
    Component.GetComponentsInParent<T>(bool, List<T>)
    Component.GetComponentsInParent<T>()
    Component.GetComponents(Type)
    Component.GetComponents(Type, List<Component>)
    Component.GetComponents<T>(List<T>)
    Component.GetComponents<T>()
    Component.GetComponentIndex()
    Component.CompareTag(string)
    Component.CompareTag(TagHandle)
    Component.SendMessageUpwards(string, object, SendMessageOptions)
    Component.SendMessageUpwards(string, object)
    Component.SendMessageUpwards(string)
    Component.SendMessageUpwards(string, SendMessageOptions)
    Component.SendMessage(string, object)
    Component.SendMessage(string)
    Component.SendMessage(string, object, SendMessageOptions)
    Component.SendMessage(string, SendMessageOptions)
    Component.BroadcastMessage(string, object, SendMessageOptions)
    Component.BroadcastMessage(string, object)
    Component.BroadcastMessage(string)
    Component.BroadcastMessage(string, SendMessageOptions)
    Component.transform
    Component.transformHandle
    Component.gameObject
    Component.tag
    Object.GetEntityId()
    Object.GetHashCode()
    Object.Equals(object)
    Object.InstantiateAsync<T>(T)
    Object.InstantiateAsync<T>(T, Transform)
    Object.InstantiateAsync<T>(T, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, Transform, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, int)
    Object.InstantiateAsync<T>(T, int, Transform)
    Object.InstantiateAsync<T>(T, int, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, int, ReadOnlySpan<Vector3>, ReadOnlySpan<Quaternion>)
    Object.InstantiateAsync<T>(T, int, Transform, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, int, Transform, Vector3, Quaternion, CancellationToken)
    Object.InstantiateAsync<T>(T, int, Transform, ReadOnlySpan<Vector3>, ReadOnlySpan<Quaternion>)
    Object.InstantiateAsync<T>(T, int, Transform, ReadOnlySpan<Vector3>, ReadOnlySpan<Quaternion>, CancellationToken)
    Object.InstantiateAsync<T>(T, InstantiateParameters, CancellationToken)
    Object.InstantiateAsync<T>(T, int, InstantiateParameters, CancellationToken)
    Object.InstantiateAsync<T>(T, Vector3, Quaternion, InstantiateParameters, CancellationToken)
    Object.InstantiateAsync<T>(T, int, Vector3, Quaternion, InstantiateParameters, CancellationToken)
    Object.InstantiateAsync<T>(T, int, ReadOnlySpan<Vector3>, ReadOnlySpan<Quaternion>, InstantiateParameters, CancellationToken)
    Object.Instantiate(Object, Vector3, Quaternion)
    Object.Instantiate(Object, Vector3, Quaternion, Transform)
    Object.Instantiate(Object)
    Object.Instantiate(Object, Scene)
    Object.Instantiate<T>(T, InstantiateParameters)
    Object.Instantiate<T>(T, Vector3, Quaternion, InstantiateParameters)
    Object.Instantiate(Object, Transform)
    Object.Instantiate(Object, Transform, bool)
    Object.Instantiate<T>(T)
    Object.Instantiate<T>(T, Vector3, Quaternion)
    Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
    Object.Instantiate<T>(T, Transform)
    Object.Instantiate<T>(T, Transform, bool)
    Object.Destroy(Object, float)
    Object.Destroy(Object)
    Object.DestroyImmediate(Object, bool)
    Object.DestroyImmediate(Object)
    Object.FindObjectsByType(Type)
    Object.FindObjectsByType(Type, FindObjectsInactive)
    Object.DontDestroyOnLoad(Object)
    Object.FindAnyObjectByType<T>()
    Object.FindAnyObjectByType<T>(FindObjectsInactive)
    Object.FindObjectsByType<T>()
    Object.FindObjectsByType<T>(FindObjectsInactive)
    Object.FindAnyObjectByType(Type)
    Object.FindAnyObjectByType(Type, FindObjectsInactive)
    Object.ToString()
    Object.name
    Object.hideFlags
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: Scylla.TextMode.CRT
    Assembly: ScyllaTextMode.CRT.dll
    Syntax
    [ExecuteAlways]
    [DisallowMultipleComponent]
    [DefaultExecutionOrder(1000)]
    [AddComponentMenu("Scylla/TextMode/TextMode CRT")]
    public sealed class TextModeCRTDriver : MonoBehaviour
    Remarks

    Add it to the GameObject that holds a UITextModeView and assign a preset. The view keeps its grid, its input and its selection; the driver renders the grid at exact cell pixels every frame, runs the tube simulation on that raster, and shows the result through a TextModeCRTScreen it creates as a child of the view. It also installs the screen as the view's pointer mapper, so clicks and selection follow the curved picture. Disabling the driver restores the plain view.

    The driver works in every render pipeline, because it uses only command buffers and a uGUI graphic. When the TextMode module is present and disabled, the driver stops all of its work and shows the plain view, keeping its textures for when the module returns.

    The settings the driver uses start as a copy of its preset. Change them through Settings at any time; ResetToPreset() copies the preset again.

    The driver does its work in LateUpdate with a high execution order, after the view has updated its grid. Each frame it copies and sanitizes the settings, places the tube inside the view's rect, captures the grid, records the raster, signal, afterglow, glow and burn-in passes into a command buffer, and hands the textures to the TextModeCRTScreen. OnDisable gives drawing back to the view and releases the command buffer and the pass chain textures; OnDestroy destroys the screen object the driver created. All of this runs on the main thread.

    The driver needs a UITextModeView on the same GameObject, or an ITextModeViewHost such as TextModeTerminalHost, whose view it uses once the host has created it. Without either it logs a warning once and does nothing until a view is added. For a world-space TextModeView use TextModeCRTMonitor, and for a whole camera picture use TextModeCRTImageRenderer through a render pipeline integration.

    The following example adds the CRT to an existing UI view from code, then switches the tube off and on again.

    var crt = view.gameObject.AddComponent<TextModeCRTDriver>();
    crt.Preset = myPreset;
    crt.QualityTier = CRTQualityTier.High;
    crt.Settings.ScanlinePitch = 3;
    

    crt.Tube.PowerOff(); crt.Tube.PowerOn();

    Properties

    HDRHeadroom

    Gets the display's headroom for the last frame, peak luminance over paper white, including a manual override. 1 on a standard display.

    Declaration
    public float HDRHeadroom { get; }
    Property Value
    Type Description
    float

    HDRMaskActive

    Gets whether HDR mask mode was active for the last frame: the settings ask for it, the display shows HDR with enough headroom, and the view's canvas can show light above paper white.

    Declaration
    public bool HDRMaskActive { get; }
    Property Value
    Type Description
    bool

    IsActive

    Gets whether the CRT is currently showing the view.

    Declaration
    public bool IsActive { get; }
    Property Value
    Type Description
    bool

    Preset

    Gets or sets the preset. Assigning a preset copies its settings into Settings.

    Declaration
    public TextModeCRTPreset Preset { get; set; }
    Property Value
    Type Description
    TextModeCRTPreset

    QualityTier

    Gets or sets the quality tier. Setting it also stops following the project defaults.

    Declaration
    public CRTQualityTier QualityTier { get; set; }
    Property Value
    Type Description
    CRTQualityTier

    ReadabilityClamp

    Gets or sets whether the readability clamp is on. Setting it also stops following the project defaults.

    Declaration
    public bool ReadabilityClamp { get; set; }
    Property Value
    Type Description
    bool

    ResolvedSettings

    Gets the settings used for the last frame, after clamping.

    Declaration
    public TextModeCRTSettings ResolvedSettings { get; }
    Property Value
    Type Description
    TextModeCRTSettings

    Screen

    Gets the screen graphic, or null before the first frame.

    Declaration
    public TextModeCRTScreen Screen { get; }
    Property Value
    Type Description
    TextModeCRTScreen

    Settings

    Gets the settings this driver uses, before the readability clamp. Change them freely; changes take effect on the next frame.

    Declaration
    public TextModeCRTSettings Settings { get; }
    Property Value
    Type Description
    TextModeCRTSettings

    Tube

    Gets or sets the tube: switch it on and off, degauss it, or clear its burn-in. The driver starts with its own tube, switched on. Assign another to share one tube between a driver and a camera effect; null is ignored.

    Declaration
    public TextModeCRTTube Tube { get; set; }
    Property Value
    Type Description
    TextModeCRTTube

    UseProjectDefaults

    Gets or sets whether the quality tier and the readability clamp follow the TextMode configuration.

    Declaration
    public bool UseProjectDefaults { get; set; }
    Property Value
    Type Description
    bool

    Methods

    ApplyPreset(TextModeCRTPreset)

    Assigns a preset and copies its settings into Settings, replacing any changes made since.

    Declaration
    public void ApplyPreset(TextModeCRTPreset preset)
    Parameters
    Type Name Description
    TextModeCRTPreset preset

    The preset to use. Null keeps the current settings and clears the preset.

    ResetToPreset()

    Copies the preset's settings again, discarding changes made since it was applied.

    Declaration
    public void ResetToPreset()

    See Also

    TextModeCRTScreen
    TextModeCRTMonitor
    TextModeCRTImageRenderer
    In this article
    Back to top Scylla Framework - TextMode Module API Documentation