Retro Look Pro API
Retro Look Pro API.
---
[Retro Look Pro on Asset Store] - http://u3d.as/1nrn
Retro Look Pro is a Post processing effect. It emulates screen bleeding , artefacts , tape noise , interlacing, shake, glitches and other effects. It is the best and complete solution for retro like games, 80's/90's/Retro/VHS/Glitch/TV look, security cameras or robotic eyes.
SRP support
Retro Look Pro fully supports Lightweight Render Pipeline.
HD Render Pipeline support will be as soon as Pipeline itself will be out of preview.
Setup NEW Effects fot Post processing stack v2.
- To use new effects collection make sure that you installed "Post processing" package from package manager (Window/Package Manager) ! Import "Retro Look Pro PP2 effects" from "Assets/LimitlessUnityDevelopment/RetroLookPro" folder.
- To setup Post processing stack v2 use this instructions https://docs.unity3d.com/Packages/com.unity.postprocessing@2.1/manual/Quick-start.html
- In post process volume/profile click Add Effect/Retro Look Pro/"needed effect".
IMPORTANT NOTE : To use presets please open "\Assets\LimitlessUnityDevelopment\RetroLookPro\Resources\ColormapPresets.unitypackage" and import it. Then fill RetroLookProColorPaletePresetsList\presetslist with all presets from "\Assets\LimitlessUnityDevelopment\RetroLookPro\Resources\Colormap Presets".
Manipulating effects variables from PP2 version of Retro look pro
https://docs.unity3d.com/Packages/com.unity.postprocessing@2.0/manual/Manipulating-the-Stack.html
Variables :
Ultimate vignette effect
using RetroLookPro.Enums; - needed
Type | Name | Description |
enum | vignetteShape | circle = 0; roundedCorners = 1 |
float | center | Circle center(parameter for vignetteShape = 0). |
float | vignetteAmount | Vignette amount. |
float | vignetteFineTune | Neat adjustment. |
float | edgeSoftness | edge softness. |
float | edgeBlend | blent edges with image. |
float | innerColorAlpha | edges inner color alpha. |
Color | innerColor | inner color. |
Scanlines effect
Type | Name | Description |
float | scanLinesColor | scanlines color |
float | scanLines | scanLines width. |
float | speed | scanlines speed. |
bool | horizontal | Horizontal/Vertical scanlines. |
float | distortion | horizontal interlacing. |
float | distortion1 | Warp. |
float | distortion2 | Cubic distortion. |
float | scale | scale center of scanlines. |
float | fade | effect fade.[0,1] |
OldFilm effect
Type | Name | Description |
float | fps | effect frames per second. [0, 60] |
float | contrast | contrast. [0, 5] |
float | burn | image burn.[-2,4] |
float | sceneCut | negative amount.[0,16] |
float | fade | effect fade.[0,1] |
Warp effect
using RetroLookPro.Enums; - needed
Type | Name | Description |
float | fade | effect fade. [0, 1] |
enum | warpMode | Simple warp; Cubic distortion. |
float | warp | Warp image corners on x/y axes. |
float | scale | Warp picture center. |
Negative effect
Type | Name | Description |
float | luminosity | brightness. [0, 2] |
float | vignette | vignette amount. [0, 1] |
float | negative | negative amount.[0,1] |
Glitch1
Type | Name | Description |
float | stretch | noise stretch amount. [0, 2] |
float | speed | noise speed. [0, 1] |
float | fade | effect fade.[0,1] |
Glitch2
Type | Name | Description |
float | intencity | noise stretch amount. [0, 1] |
float | resolutionMultiplier | glitch blocks height.(changes applies on enter in play mode) [1, 2] |
float | stretchMultiplier | glitch blocks width.[0,1] |
Glitch3
Type | Name | Description |
float | speed | glitch speed. |
float | density | glitch amount |
float | maxDisplace | glitch max offset |
Bottom Noise
Type | Name | Description |
float | height | Height of Stretch/Noise. [0, 0.5] |
float | intencity | Noise intensity. [0, 3] |
Texture | noiseTexture | Noise texture. |
Bottom Stretch
Type | Name | Description |
float | height | Height of Stretch/Noise. [0.01, 0.5] |
bool | distort | distort stretched area. [] |
float | frequency | Distortion frequency. [100, 0.1] |
float | amplitude | Distortion amplitude. [0.01f, 200f] |
bool | distortRandomly | enable random amplitude and frequency |
Cinematic bars
Type | Name | Description |
float | amount | amount of black bars. [0.5, 0.01] |
float | fade | fade effect. [0,1] |
Color Palette
Type | Name | Description |
ResolutionMode | resolutionMode | The resolution of the pixelated image can be set in two ways.Either by setting absolute values (ConstantResolution) or by setting the pixel size (ConstantPixelSize). |
Vector2Int | resolution | Change Resolution manually if using resolutionModeIndex - 0. |
int | pixelSize | Change pixel size if using resolutionModeIndex - 1, in this case resolution calculates automatically. [1, 256] |
float | dither | Dithering effect. [ 0 , 1] |
float | opacity | Effect opacity. [0, 1] |
int | presetIndex | Palette preset index number in palette presets list. |
TV effect
using RetroLookPro.Enums; - needed
Type | Name | Description |
float | fade | fade effect. [0, 1] |
float | hardScan | Dark areas fine tune. [-8, -16] |
float | resScale | Effect resolution. [16, 1] |
enum | warpMode | Simple warp; Cubic distortion. |
float | hardPix | pixels sharpness. [-3, 1] |
float | maskDark | Dark areas adjustment. [0, 2] |
float | maskLight | Light areas adjustment. [0, 2] |
float | warp | Warp image corners on x/y axes. |
float | scale | Warp picture center. |
VHS effect
using RetroLookPro.Enums; - needed
Type | Name | Description |
Texture | noiseTexture | Noise texture. |
float | _textureIntensity | Intensity of noise texture. [0, 1] |
float | _textureCutOff | Intensity of noise texture. [-1, 1] |
enum | blendMode | Photoshop like blendingModes. [21 modes] |
float | verticalOffsetFrequency | Vertical twitch frequency. [0, 100] |
float | verticalOffset | Amount of vertical twitch. [0, 1] |
float | stripes | Cinematic black bars. Low value of this parameter is very usefull in pair with vertical offset [0,1] |
float | colorOffset | Amount of RGB shift. [] |
float | colorOffsetAngle | RGB shift angle Offset Angle. [] |
float | offsetDistortion | Amount of horizontal distortion. [3500, 1] |
Bleed effect
Type | Name | Description |
int | bleedMode | Bleed Mode index. 0 - "Old Three Phase" 1 - "Three Phase" 2 - "Two Phase" 3 - "Custom". |
float | bleedAmount | Bleed Stretch amount. [0, 15] |
int | bleedLength | Bleed Length [0, 50]. If b_Mode = 3 |
bool | editCurves | Enable this to edit curves and see result instantly (otherwise result will be applied after you enter playmode) . |
bool | syncYQ | Synchronize Y and Q chanels. |
AnimationCurve | curveY | Curve Y chanel. |
AnimationCurve | curveI | Curve I chanel. |
AnimationCurve | curveQ | Curve Q chanel. |
Fisheye effect
Type | Name | Description |
float | bend | Bend Amount. [0, 50] |
int | fisheyeType | Fisheye type index. 0 - "Default", 1 - "Hyperspace". |
float | size | Fisheye size. [0, 50] |
float | cutOffX | Cutoff on X axes. [0, 50] |
float | cutOffY | Cutoff on Y axes. [0, 50] |
float | fadeX | Fade on X axes. [0, 50] |
float | fadeY | Fade on Y axes. [0, 50] |
Pulsating Vignette effect
Type | Name | Description |
float | amount | Amount of vignette effect. [0, 5] |
float | speed | Vignette blinking speed. [0, 5] |
Noise
Type | Name | Description |
float | stretchResolution | resolution. |
float | n_NoiseLinesAmountY | Amount of noise lines on Y axes. |
float | n_NoiseSignalProcessing | Noise Signal Processing Amount. [0, 1] |
bool | f_Granularity | Enable granularity noise effect. |
float | f_GranularityAmount | Granularity Alpha. [0, 0.1] |
- Signal Noise
Type | Name | Description |
bool | f_SignalNoise | Enable signal noise. |
float | f_SignalNoiseAmount | Signal amount. [0, 1] |
float | f_SignalNoisePower | Signal power. [0, 1] |
- Tape Noise
Type | Name | Description |
bool | f_TapeNoise | Enable tape noise. |
float | f_TapeNoiseTH | Tape Amount. [0, 1.5] |
float | f_TapeNoiseAmount | Tape alpha. [0, 1.5] |
float | f_TapeNoiseSpeed | Tape speed. [0, 1.5] |
- Line Noise
Type | Name | Description |
bool | f_LineNoise | Enable line noise. |
float | f_LineNoiseAmount. | Amount of line noise. [0, 10] |
float | f_LineNoiseSpeed | Noise speed. [0, 10] |
bool | unscaledTime | Time.unscaledTime. |
Video Shake filter
- Jitter
Type | Name | Description |
bool | stretch | Enable stretch noise. |
float | stretchResolution | Stretch resolution. [] |
bool | jitterHorizontal | Enable Horizontal Interlacing. |
float | jitterHorizontalAmount | Amount of horizontal interlacing. [0, 5] |
bool | jitterVertical | Shake Vaertical. |
float | jitterVerticalAmount | Amount of shake. [0, 15] |
float | jitterVerticalSpeed | Speed of vertical shake. [0, 5] |
- Twitch
Type | Name | Description |
bool | twitchHorizontal | Enable Twitch on X axes. |
float | horizontalFreq | Twitch frequency on X axes. [0, 5] |
bool | twitchVertical | Enable Twitch on Y axes. |
float | verticalFreq | Twitch frequency on Y axes. [0, 5] |
bool | unscaledTime | Time.unscaledTime . |
Picture correction
Type | Name | Description |
float | signalAdjustY | Y permanent adjustment. [-0.25, 0.25] |
float | signalAdjustI | I permanent adjustment. [-0.25, 0.25] |
float | signalAdjustQ | Q permanent adjustment. [-0.25, 0.25] |
float | signalShiftY | tweak/shift Y values. [-2, 2] |
float | signalShiftI | tweak/shift I values. [-2, 2] |
float | signalShiftQ | tweak/shift Q values. [-2, 2] |
float | gammaCorection | use this to balance the gamma(brightness) of the signal. [0, 2] |
Artefacts
Type | Name | Description |
float | cutOff | Brightness threshold of input. [0, 1] |
float | amount | Amplifies the input amount after cutoff. [0, 3] |
float | fade | Value represents how fast trail fades. [0, 1]. |
Color | color | Artefacts color. |
Legacy API
API usage examples:
Example 1
// This example shows how to access variables from needed RetroLookPro/RetroLookPostPro cached preset.
// In this case "development mode" in "RetroLookPro/RetroLookPostPro" should be turned off.
// Note that all changes will be reversed after you exit game mode. It is much safer to use this method instead of second one.
using UnityEngine;
using LimitlessDev.RetroLookPro;
public class APIExampleUsage1 : MonoBehaviour {
//Reference to RetroLookPro/RetroLookPostPro that you are currently using.
public RetroLookPro RetroLookReference;
// Update is called once per frame
void Update()
{
//Enable/Disable needed variable on "Space" key press.
if (Input.GetKeyDown(KeyCode.Space)) {
if (RetroLookReference.tempPreset.f_Fisheye)
RetroLookReference.tempPreset.f_Fisheye = false;
else
RetroLookReference.tempPreset.f_Fisheye = true;
} } }
Example 2
// This example shows how to access variables directly from preset Scriptable Object.
// In this case "development mode" in "RetroLookPro/RetroLookPostPro" should be turned on.
// Note that all changes made in Scriptable Objects will be saved after you exit game mode. Very usefull in some cases.
using UnityEngine;
using LimitlessDev.RetroLookPro;
public class APIExampleUsage2 : MonoBehaviour
{
//Reference to the Scriptable Object preset that you are currently using.
public PresetScriptableObject RetroLookScriptableObjectReference;
// Update is called once per frame
void Update() {
//Enable/Disable needed variable on "Space" key press.
if (Input.GetKeyDown(KeyCode.Space))
{
if (RetroLookScriptableObjectReference.currPreset.f_Fisheye)
RetroLookScriptableObjectReference.currPreset.f_Fisheye = false;
else
RetroLookScriptableObjectReference.currPreset.f_Fisheye = true;
}
}
}
Variables:
- Bottom Noise
bool | useBottomNoise | Enable/disable bottom noise effect. |
float | bottomHeight | Height of Stretch/Noise. [0, 0.5] |
float | bottomIntensity | Noise intensity. [0, 3] |
bool | useBottomStretch | Enable stretch effect. |
- Color Palette
bool | enableColorPalette | Enables color palette effect. |
ResolutionMode | resolutionMode | The resolution of the pixelated image can be set in two ways.Either by setting absolute values (ConstantResolution) or by setting the pixel size (ConstantPixelSize). |
int | resolutionModeIndex | 0 - Constant Resolution, 1 - Constant PixelSize. |
Vector2Int | resolution | Change Resolution manually if using resolutionModeIndex - 0. |
int | pixelSize | Change pixel size if using resolutionModeIndex - 1, in this case resolution calculates automatically. [1, 256] |
float | dither | Dithering effect. [ 0 , 1] |
float | opacity | Effect opacity. [0, 1] |
int | colorPresetIndex | Palette preset index number in palette presets list. |
- TV Mode
bool | _enableTVmode | Enable TV effect. |
Texture | _VHSNoise | Noise texture. |
float | _textureIntensity | Intensity of noise texture. [0, 8] |
float | _VerticalOffsetFrequency | Vertical twitch frequency. [0, 100] |
float | _verticalOffset | Amount of vertical twitch. [0, 1] |
float | _offsetColor | Amount of color offset. [0, 0.1] |
float | _OffsetDistortion | Amount of horizontal distortion. [3500, 1] |
bool | _scan | Enable scanlines. |
float | _adjustLines | Scanlines amount. [1, 10] |
Color | _scanLinesColor | Scanlines color. |
float | _hardScan | Scanlines effect amount. [-8, -16] |
float | _resolution | Effect resolution. [16, 1] |
float | maskDark | Dark areas adjustment. [0, 2] |
float | maskLight | Light areas adjustment. [0, 2] |
Vector4 | warp | Warp picture. |
- ByPass mode (Use this mode for passing videos or static images)
bool | enableCustomTexture | Enable bypass mode(only for RetroLookPro). |
Texture | bypassTex | Bypass Texture(if you have ready to go RenderTexture or any other texture, then no need to touch spriteTex). |
Sprite | spriteTex | Bypass sprite(bypassTex will be computed automaticly). |
- Bleed effect
int | b_Mode | Bleed Mode index. 0 - "Old Three Phase" 1 - "Three Phase" 2 - "Two Phase (slow)" 3 - "Custom Curve". |
bool | b_Bleed | Enable bleed effect. |
int | b_LinesMode | Vertical Resolution mode index. 0 - "Full" 1 - "240 " 2 - "480 " 3 - "Users". |
float | b_ScreenLinesNum | Lines Per Height, if b_LinesMode = 3. |
float | b_BleedAmount | Bleed Stretch amount. [0, 15] |
int | b_BleedLength | Bleed Length [0, 50]. If b_Mode = 3 |
bool | b_BleedCurveSync | Synchronize I and Q chanels. |
AnimationCurve | b_BleedCurve1 | Curve Y chanel. |
AnimationCurve | b_BleedCurve2 | Curve I chanel. |
AnimationCurve | b_BleedCurve3 | Curve Q chanel. |
- Fisheye effect
bool | f_Fisheye | Enable fisheye effect. |
float | f_FisheyeBend | Bend Amount. [0, 50] |
int | f_FisheyeType | Fisheye type index. 0 - "Default", 1 - "Hyperspace". |
float | f_FisheyeSize | Fisheye size. [0, 50] |
float | f_CutoffX | Cutoff on X axes. [0, 50] |
float | f_CutoffY | Cutoff on Y axes. [0, 50] |
float | f_FadeX | Fade on X axes. [0, 50] |
float | f_FadeY | Fade on Y axes. [0, 50] |
- Vignette effect
bool | v_Vignette | Enable Vignette effect. |
float | v_VignetteAmount | Amount of vignette effect. [0, 5] |
float | v_VignetteSpeed | Vignette twitch speed. [0, 5] |
- Noise
int | n_NoiseMode | Vertical Resolution index. 0 - "Global", 1 - "Custom". |
float | n_NoiseLinesAmountY | Amount of noise lines on Y axes. |
float | n_NoiseSignalProcessing | Noise Signal Processing Amount. [0, 1] |
bool | f_Granularity | Enable granularity noise effect. |
float | f_GranularityAmount | Granularity Alpha. [0, 0.1] |
Signal Noise
bool | f_SignalNoise | Enable signal noise. |
float | f_SignalNoiseAmount | Signal amount. [0, 1] |
float | f_SignalNoisePower | Signal power. [0, 1] |
Tape Noise
bool | f_TapeNoise | Enable tape noise. |
float | f_TapeNoiseTH | Tape Amount. [0, 1.5] |
float | f_TapeNoiseAmount | Tape alpha. [0, 1.5] |
float | f_TapeNoiseSpeed | Tape speed. [0, 1.5] |
Line Noise
bool | f_LineNoise | Enable line noise. |
float | f_LineNoiseAmount. | Amount of line noise. [0, 10] |
float | f_LineNoiseSpeed | Noise speed. [0, 10] |
- Video Shake filter
Jitter
bool | j_ScanLines | Enable scanlines. |
float | j_ScanLinesWidth | Width of the scanlines. [0, 20] |
bool | j_LinesFloat | Floating lines amount. |
float | j_LinesSpeed | Lines speed. [-3, 3] |
bool | j_Stretch | Enable stretch noise. |
bool | j_JitterHorizontal | Enable Horizontal Interlacing. |
float | j_JitterHorizAmount | Amount of horizontal interlacing. [0, 5] |
bool | j_JitterVertical | Shake Vaertical. |
float | j_VertAmount | Amount of shake. [0, 15] |
float | j_VertSpeed | Speed of vertical shake. [0, 5] |
Twitch
bool | j_TwitchHorizontal | Enable Twitch on X axes. |
float | j_TwitchHorizFreq | Twitch frequency on X axes. [0, 5] |
bool | j_TwitchVertical | Enable Twitch on Y axes. |
float | j_TwitchVertFreq | Twitch frequency on Y axes. [0, 5] |
- Picture correction
bool | p_PictureCorrection | Enable Picture correction effect. |
float | p_PictureCorr1 | Y permanent adjustment. [-0.25, 0.25] |
float | p_PictureCorr2 | I permanent adjustment. [-0.25, 0.25] |
float | p_PictureCorr3 | Q permanent adjustment. [-0.25, 0.25] |
float | p_PictureShift1 | tweak/shift Y values. [-2, 2] |
float | p_PictureShift2 | tweak/shift I values. [-2, 2] |
float | p_PictureShift3 | tweak/shift Q values. [-2, 2] |
float | p_Gamma | use this to balance the gamma(brightness) of the signal. [0, 2] |
- Artefacts
bool | a_Artefacts | Enable artefacts/trail effect. |
float | a_ArtefactsThreshold | Brightness threshold of input. [0, 1] |
float | a_ArtefactsAmount | Amplifies the input amount after cutoff. [0, 3] |
float | a_ArtefactsFadeAmount | Value represents how fast trail fades. [0, 1]. |
Color | a_ArtefactsColor | Artefacts color. |
- Time Setting
bool | independentTimeOn | In case of using Time.timeScale = 0 (or Application.timeScale = 0) ,it stops shader timer and it's animation. If you still need shader to run, use unscaled time" feature. |