Skip to content

ScreenEffects

namespace Griff.Scenes;
public sealed class ScreenEffects : Component

Changes 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.

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.

public float Brightness { get; set; }

Added to every color: 0 as drawn, -1 black, 1 white. Small amounts (±0.1) for a mood.

public float Contrast { get; set; }

1 as drawn; more makes darks darker and lights lighter, less washes it out.

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.

public bool IsActive { get; }

True if any setting changes the screen at all.

public ScreenPalette Palette { get; set; }

Draws the screen in a few colors only, after everything above.

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.

public float Saturation { get; set; }

How colorful it is: 1 as drawn, 0 black and white, more than 1 vivid.

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.

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.