Interface ITextModeCRTCameraEffect
Shows a camera's whole picture through the CRT, implemented by a render pipeline package.
Namespace: Scylla.TextMode.CRT
Assembly: ScyllaTextMode.CRT.dll
Syntax
public interface ITextModeCRTCameraEffect
Remarks
Code that should work with any render pipeline talks to this interface through Provider instead of referencing a pipeline package. The Scylla TextMode for URP and TextMode for HDRP packages register their implementation while their render pipeline is the active one.
The camera setup lives in shared state, not in the implementation, so it survives a switch between pipelines. The settings and the tube passed to Show(Camera, TextModeCRTSettings, CRTQualityTier, bool, int, TextModeCRTTube) are kept as references and read every frame, so changing them later changes the picture without another call.
Properties
Name
Gets a short name of the implementation, such as URP.
Declaration
string Name { get; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
CanShow(Camera, out string)
Gets whether the effect can draw for a camera right now, for example whether its render pipeline is active and set up. For URP this also checks that the camera is not an overlay camera and that its renderer has the TextMode CRT renderer feature.
Declaration
bool CanShow(Camera camera, out string reason)
Parameters
| Type | Name | Description |
|---|---|---|
| Camera | camera | The camera to check. |
| string | reason | A sentence that says why it cannot, when the method returns false; null when it can. |
Returns
| Type | Description |
|---|---|
| bool | True if Show(Camera, TextModeCRTSettings, CRTQualityTier, bool, int, TextModeCRTTube) will take effect. |
Hide(Camera)
Stops showing the camera through the CRT set up by Show(Camera, TextModeCRTSettings, CRTQualityTier, bool, int, TextModeCRTTube). Does nothing when the camera was not shown this way. A Volume setup for the camera applies again afterwards.
Declaration
void Hide(Camera camera)
Parameters
| Type | Name | Description |
|---|---|---|
| Camera | camera | The camera. |
Show(Camera, TextModeCRTSettings, CRTQualityTier, bool, int, TextModeCRTTube)
Shows the camera through the CRT from the next frame on, replacing any Volume setup for that camera. Call again to change the settings; the settings are read every frame.
Declaration
void Show(Camera camera, TextModeCRTSettings settings, CRTQualityTier tier, bool readabilityClamp, int sourceLines, TextModeCRTTube tube = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Camera | camera | The camera. |
| TextModeCRTSettings | settings | The settings to use. The instance is kept and read every frame. |
| CRTQualityTier | tier | The quality tier, which sets how much work the CRT does per frame. |
| bool | readabilityClamp | Whether to limit the settings that cost legibility. |
| int | sourceLines | A fixed number of source lines, or 0 to derive it from the scanline pitch. Negative values count as 0. |
| TextModeCRTTube | tube | The tube to switch on and off, degauss and collect burn-in on, or null for a tube that is simply on. The instance is kept, so calls on it take effect on the camera. |