ScreenEffects
namespace Griff.Scenes;
public sealed class ScreenEffects : ComponentChanges the look of the whole screen, HUD included: a dark vignette round the edges, an old TV’s scanlines and curved glass, big chunky pixels, color fringes, and the colors themselves (saturation, contrast, brightness, a tint, or a handheld’s four greens). Put it on the camera. Every setting can be changed while the game runs, so scripts can tween them: drain the color as the player’s health runs low, or bulge the screen on a big hit.
This is a component: its saved properties are on its component page.
Properties
Section titled “Properties”Aberration
Section titled “Aberration”public float Aberration { get; set; }How far red and blue split apart towards the edges, like a cheap lens, from 0 (not at all) to 1.
Brightness
Section titled “Brightness”public float Brightness { get; set; }Added to every color: 0 as drawn, -1 black, 1 white. Small amounts (±0.1) for a mood.
Contrast
Section titled “Contrast”public float Contrast { get; set; }1 as drawn; more makes darks darker and lights lighter, less washes it out.
Curvature
Section titled “Curvature”public float Curvature { get; set; }How much the screen bulges like an old TV’s curved glass, from 0 (flat) to 1. 0.3 is about right.
public float Grain { get; set; }How much film grain flickers over the screen, from 0 (none) to 1.
IsActive
Section titled “IsActive”public bool IsActive { get; }True if any setting changes the screen at all.
Palette
Section titled “Palette”public ScreenPalette Palette { get; set; }Draws the screen in a few colors only, after everything above.
PixelSize
Section titled “PixelSize”public float PixelSize { get; set; }How big each pixel is drawn, in screen pixels on a 720-pixel-high window (it scales with the window): 1 is off, 4 is chunky, 8 is blocky.
Saturation
Section titled “Saturation”public float Saturation { get; set; }How colorful it is: 1 as drawn, 0 black and white, more than 1 vivid.
Scanlines
Section titled “Scanlines”public float Scanlines { get; set; }How dark an old TV’s lines across the screen are, from 0 (none) to 1 (black).
public Color Tint { get; set; }Multiplied into every color: white leaves it alone, a pale blue for night, red for danger.
Vignette
Section titled “Vignette”public float Vignette { get; set; }How much the corners and edges darken, from 0 (not at all) to 1 (a spyglass). 0.4 frames a scene softly.