Exemplo n.º 1
0
    void Update()
    {
        float totalTime   = endTime - startTime;
        float currentTime = Time.time - startTime;

        GlitchSetting.Lerp(ref currentGlitch, maxGlitch, nonGlitch, currentTime / totalTime);
        currentGlitch.Overwrite(hardware);
    }
Exemplo n.º 2
0
 public static void Lerp(ref GlitchSetting target, GlitchSetting start, GlitchSetting end, float amount)
 {
     target.chromaticAberration = Mathf.Lerp(start.chromaticAberration, end.chromaticAberration, amount);
     target.axialAberration     = Mathf.Lerp(start.axialAberration, end.axialAberration, amount);
     target.blur                = Mathf.Lerp(start.blur, end.blur, amount);
     target.blurSpread          = Mathf.Lerp(start.blurSpread, end.blurSpread, amount);
     target.luminanceDependency = Mathf.Lerp(start.luminanceDependency, end.luminanceDependency, amount);
     target.blurDistance        = Mathf.Lerp(start.blurDistance, end.blurDistance, amount);
 }
Exemplo n.º 3
0
 void Awake()
 {
     hardware      = GetComponent <VignetteAndChromaticAberration>();
     nonGlitch     = new GlitchSetting(hardware);
     currentGlitch = new GlitchSetting(hardware);
 }