AudioAsset
Ease
FastString
FontAsset
NineSlice
PackedSprite
PackedSpriteID
RB
   HardwareSettings
   IRetroBlitGame
RBAsset
Rect2i
ShaderAsset
SoundReference
SpriteGrid
SpriteSheetAsset
TMXMapAsset
   TMXLayer
   TMXLayerLoadState
   TMXObject
   TMXObjectGroup
   TMXProperties
Vector2i

RB.EffectSet

Method  -  Static

public static void EffectSet(Effect type, float intensity, Vector2i parameters, Color32 color)
public static void EffectSet(Effect type, float intensity)
public static void EffectSet(Effect type, Vector2i parameters)
public static void EffectSet(Effect type, Color32 color)

Parameters

type Effect Effect type
intensity float Intensity
parameters Vector2i Additional parameters
color Color32 Color

Returns

Nothing.

Description

Set values for the given post processing effect type. Different effects use different parameters. See RB.Effect for a list of all built-in RetroBlit effects, and their preview.

Post-processing effects are effects that can be applied after IRetroBlitGame.Render exits. Unlike normal rendering, some of the post processing effects render in native window resolution and so can create sub-pixel details such as Scanlines.

Multiple effects can be layered together. For example you may want to enable the Scanlines, Noise, and Curvature effects together to create a nice retro CRT TV effect.

It is also possible to write your own custom post-processing effects by loading shaders with ShaderAsset.Load and setting them with RB.EffectShader.

Example

void Initialize() {
    // Setup a retro CRT TV effect with scanlines and a bit of noise
    RB.EffectSet(RB.Effect.Scanlines, 0.25f);
    RB.EffectSet(RB.Effect.Noise, 0.05f);
    RB.EffectSet(RB.Effect.Curvature, 0.15fnew Color32(323232255));
}

See Also

RB.EffectShader
RB.EffectFilter
RB.EffectReset
RB.EffectApplyNow

See Docs

Features - Post-Processing Effects
Features - Post-Processing Shaders